mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Fixed amb110 - socket_change() returned 1 if select() syscall returned -1 (KoST)
This commit is contained in:
parent
33e01af955
commit
5d6d0282b0
@ -133,7 +133,7 @@ static cell AMX_NATIVE_CALL socket_change(AMX *amx, cell *params) /* 2 param */
|
|||||||
tv.tv_sec = 0;
|
tv.tv_sec = 0;
|
||||||
tv.tv_usec = timeout;
|
tv.tv_usec = timeout;
|
||||||
// Now we "select", which will show us if new data is waiting in the socket's buffer
|
// Now we "select", which will show us if new data is waiting in the socket's buffer
|
||||||
if (select(socket+1, &rfds, NULL, NULL, &tv))
|
if (select(socket+1, &rfds, NULL, NULL, &tv) > 0)
|
||||||
return 1; // Ok, new data, return it
|
return 1; // Ok, new data, return it
|
||||||
else
|
else
|
||||||
return 0; // No new data, return it
|
return 0; // No new data, return it
|
||||||
|
Loading…
Reference in New Issue
Block a user