Timeout detection bug when timeout value was 0 in the select function.

This commit is contained in:
Diego Nehab 2001-07-23 20:13:01 +00:00
parent c16b6d9312
commit 0cc37c4b41

View File

@ -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;
}