aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2001-07-23 20:13:01 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2001-07-23 20:13:01 +0000
commit0cc37c4b41d8762a62a2939ac100ef8b77205c44 (patch)
tree77f7c80f46b8216be0a071f10febfb11e87a1228 /src
parentc16b6d931243bed0d41f2fe1b7fced48fa493268 (diff)
downloadluasocket-0cc37c4b41d8762a62a2939ac100ef8b77205c44.tar.gz
luasocket-0cc37c4b41d8762a62a2939ac100ef8b77205c44.tar.bz2
luasocket-0cc37c4b41d8762a62a2939ac100ef8b77205c44.zip
Timeout detection bug when timeout value was 0 in the select function.
Diffstat (limited to 'src')
-rw-r--r--src/luasocket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/luasocket.c b/src/luasocket.c
index f72615a..3b3f697 100644
--- a/src/luasocket.c
+++ b/src/luasocket.c
@@ -652,7 +652,7 @@ int global_select(lua_State *L)
652 /* see if we can read, write or if we timedout */ 652 /* see if we can read, write or if we timedout */
653 ret = select(max, prfds, pwfds, NULL, ptm); 653 ret = select(max, prfds, pwfds, NULL, ptm);
654 /* did we timeout? */ 654 /* did we timeout? */
655 if (ret <= 0 && ms > 0) { 655 if (ret <= 0 && ms >= 0) {
656 push_error(L, NET_TIMEOUT); 656 push_error(L, NET_TIMEOUT);
657 return 3; 657 return 3;
658 } 658 }