diff --git a/mud b/mud index eab4cdb..f67a5b4 160000 --- a/mud +++ b/mud @@ -1 +1 @@ -Subproject commit eab4cdb1ad758f4f9d0b9eeb578a6bbc3bd4420b +Subproject commit f67a5b4fed0208fcffe8502473099c70b685342f diff --git a/src/bind.c b/src/bind.c index 992eb6f..0f98ca7 100644 --- a/src/bind.c +++ b/src/bind.c @@ -207,7 +207,7 @@ gt_bind(int argc, char **argv) unsigned char buf[4096]; while (!gt_quit) { - unsigned long send_wait = mud_send_wait(mud); + long send_wait = mud_send_wait(mud); if (send_wait) { FD_CLR(tun_fd, &rfds); @@ -223,7 +223,7 @@ gt_bind(int argc, char **argv) .tv_usec = send_wait, }; - const int ret = select(last_fd, &rfds, NULL, NULL, send_wait ? &tv : NULL); + const int ret = select(last_fd, &rfds, NULL, NULL, send_wait > 0 ? &tv : NULL); if (ret == -1) { if (errno == EBADF) {