diff options
Diffstat (limited to 'src/common/socket.c')
-rw-r--r-- | src/common/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/socket.c b/src/common/socket.c index ef8e99762..79b95c563 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -551,14 +551,14 @@ int do_sockets(int next) memcpy(&rfd, &readfds, sizeof(rfd)); ret = select(fd_max, &rfd, NULL, NULL, &timeout); - if( ret < 0 ) + if( ret == SOCKET_ERROR ) { - if( ret != S_EINTR ) + if( s_errno != S_EINTR ) { - ShowFatalError("do_sockets: select() returned %d!\n", ret); + ShowFatalError("do_sockets: select() failed, error code %d!\n", s_errno); exit(EXIT_FAILURE); } - return 0; + return 0; // interrupted by a signal, just loop and try again } #ifdef WIN32 |