aboutsummaryrefslogtreecommitdiff
path: root/src/select.c
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2005-06-12 22:02:21 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2005-06-12 22:02:21 +0000
commit8b114f3bf4ccea3b065551fa94649a9e45935b5b (patch)
tree06f2faa7e896e9434ba89ec68445ea56e6c8c6dc /src/select.c
parentb22f6f3830515a57a8776e7489b3e2d434abd12f (diff)
downloadluasocket-8b114f3bf4ccea3b065551fa94649a9e45935b5b.tar.gz
luasocket-8b114f3bf4ccea3b065551fa94649a9e45935b5b.tar.bz2
luasocket-8b114f3bf4ccea3b065551fa94649a9e45935b5b.zip
Stupid bug in http.lua.
Diffstat (limited to 'src/select.c')
-rw-r--r--src/select.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/select.c b/src/select.c
index efdbdff..e2cd91d 100644
--- a/src/select.c
+++ b/src/select.c
@@ -124,7 +124,7 @@ static int collect_fd(lua_State *L, int tab, int max_fd,
124 break; 124 break;
125 } 125 }
126 fd = getfd(L); 126 fd = getfd(L);
127 if (fd > 0) { 127 if (fd >= 0) {
128 FD_SET(fd, set); 128 FD_SET(fd, set);
129 if (max_fd < fd) max_fd = fd; 129 if (max_fd < fd) max_fd = fd;
130 lua_pushnumber(L, fd); 130 lua_pushnumber(L, fd);
@@ -150,7 +150,7 @@ static int check_dirty(lua_State *L, int tab, int dtab, fd_set *set) {
150 break; 150 break;
151 } 151 }
152 fd = getfd(L); 152 fd = getfd(L);
153 if (fd > 0 && dirty(L)) { 153 if (fd >= 0 && dirty(L)) {
154 lua_pushnumber(L, ++ndirty); 154 lua_pushnumber(L, ++ndirty);
155 lua_pushvalue(L, -2); 155 lua_pushvalue(L, -2);
156 lua_settable(L, dtab); 156 lua_settable(L, dtab);