summaryrefslogtreecommitdiff
path: root/source/net_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/net_common.c')
-rw-r--r--source/net_common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/net_common.c b/source/net_common.c
index 69a8cc6..74909bf 100644
--- a/source/net_common.c
+++ b/source/net_common.c
@@ -1027,8 +1027,11 @@ void NET_Sleep( int msec ) {
timeout.tv_sec = msec / 1000;
timeout.tv_usec = ( msec % 1000 ) * 1000;
if( s == INVALID_SOCKET ) {
- select( 0, NULL, NULL, NULL, &timeout );
- return;
+ s = udp_sockets[NS_CLIENT];
+ if( s == INVALID_SOCKET ) {
+ select( 0, NULL, NULL, NULL, &timeout );
+ return;
+ }
}
FD_ZERO( &fdset );