aboutsummaryrefslogtreecommitdiff
path: root/src/usocket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/usocket.c')
-rw-r--r--src/usocket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usocket.c b/src/usocket.c
index 6a0b178..e70806a 100644
--- a/src/usocket.c
+++ b/src/usocket.c
@@ -110,7 +110,8 @@ int socket_select(t_socket n, fd_set *rfds, fd_set *wfds, fd_set *efds,
110 double t = timeout_getretry(tm); 110 double t = timeout_getretry(tm);
111 tv.tv_sec = (int) t; 111 tv.tv_sec = (int) t;
112 tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6); 112 tv.tv_usec = (int) ((t - tv.tv_sec) * 1.0e6);
113 ret = select(n, rfds, wfds, efds, t >= 0.0? &tv: NULL); 113 /* timeout = 0 means no wait */
114 ret = select(n, rfds, wfds, efds, t >= 0.0 ? &tv: NULL);
114 } while (ret < 0 && errno == EINTR); 115 } while (ret < 0 && errno == EINTR);
115 return ret; 116 return ret;
116} 117}