mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 06:18:21 +01:00
Timeout detection bug when timeout value was 0 in the select function.
This commit is contained in:
parent
c16b6d9312
commit
0cc37c4b41
@ -652,7 +652,7 @@ int global_select(lua_State *L)
|
||||
/* see if we can read, write or if we timedout */
|
||||
ret = select(max, prfds, pwfds, NULL, ptm);
|
||||
/* did we timeout? */
|
||||
if (ret <= 0 && ms > 0) {
|
||||
if (ret <= 0 && ms >= 0) {
|
||||
push_error(L, NET_TIMEOUT);
|
||||
return 3;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user