Fix highest file descriptor for select(), thanks to Ben Millwood for reporting
This commit is contained in:
1 parent
02195ea8bd
commit
3dddabcc52
1 file changed
+2
-3
@@ -1654,8 +1654,7 @@ void NET_Sleep( int msec ) {
|
||||
{
|
||||
FD_SET(ip_socket, &fdset);
|
||||
|
||||
if(ip_socket > highestfd)
|
||||
highestfd = ip_socket;
|
||||
highestfd = ip_socket;
|
||||
}
|
||||
if(ip6_socket != INVALID_SOCKET)
|
||||
{
|
||||
@@ -1667,7 +1666,7 @@ void NET_Sleep( int msec ) {
|
||||
|
||||
timeout.tv_sec = msec/1000;
|
||||
timeout.tv_usec = (msec%1000)*1000;
|
||||
select(ip_socket+1, &fdset, NULL, NULL, &timeout);
|
||||
select(highestfd + 1, &fdset, NULL, NULL, &timeout);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user