diff options
-rw-r--r-- | src/usocket.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/usocket.c b/src/usocket.c index 3221cb9..f4c0a84 100644 --- a/src/usocket.c +++ b/src/usocket.c | |||
@@ -49,6 +49,7 @@ int socket_waitfd(p_socket ps, int sw, p_timeout tm) { | |||
49 | fd_set rfds, wfds, *rp, *wp; | 49 | fd_set rfds, wfds, *rp, *wp; |
50 | struct timeval tv, *tp; | 50 | struct timeval tv, *tp; |
51 | double t; | 51 | double t; |
52 | if (*ps >= FD_SETSIZE) return EINVAL; | ||
52 | if (timeout_iszero(tm)) return IO_TIMEOUT; /* optimize timeout == 0 case */ | 53 | if (timeout_iszero(tm)) return IO_TIMEOUT; /* optimize timeout == 0 case */ |
53 | do { | 54 | do { |
54 | /* must set bits within loop, because select may have modifed them */ | 55 | /* must set bits within loop, because select may have modifed them */ |