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 bf1ca111f7f88cf300f0c18f9c1c93930549ea99..76a35123c8b5b414b45eec935a525e8d906ae22a 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);
 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;
        ret = select(fd + 1, NULL, &wfds, NULL, &tv);
        if (ret < 0 && errno == EINTR)
                goto again;