Don't wait too long when we have data to send

This commit is contained in:
Adrien Gallouët
2016-06-27 11:19:16 +00:00
parent 1db628d84a
commit a01dc81500

View File

@@ -386,7 +386,7 @@ int main (int argc, char **argv)
.tv_usec = 100000,
};
if (mud_can_push(mud))
if (mud_can_push(mud) || send_size)
timeout.tv_usec = 1000;
if _0_(select(mud_fd+1, &rfds, NULL, NULL, &timeout)==-1) {