write_ok(): Always reset the select timeout
authorAndre <maan@p133.(none)>
Fri, 7 Jul 2006 13:36:55 +0000 (15:36 +0200)
committerAndre <maan@p133.(none)>
Fri, 7 Jul 2006 13:36:55 +0000 (15:36 +0200)
send.h

diff --git a/send.h b/send.h
index bf1ca11..76a3512 100644 (file)
--- a/send.h
+++ b/send.h
@@ -101,6 +101,8 @@ static inline int write_ok(int fd)
 again:
        FD_ZERO(&wfds);
        FD_SET(fd, &wfds);
+       tv.tv_sec = 0;
+       tv.tv_usec = 0;
        ret = select(fd + 1, NULL, &wfds, NULL, &tv);
        if (ret < 0 && errno == EINTR)
                goto again;