Skip to content

Commit

Permalink
fixes bug
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed Oct 25, 2023
1 parent 6bb590a commit b5bf364
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion binding/lua_select.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ namespace bee::lua_select {
return 2;
}
#else
for (; ctx.i < ctx.maxfd; ++ctx.i) {
for (; ctx.i <= ctx.maxfd; ++ctx.i) {
lua_Integer event = 0;
if (FD_ISSET(ctx.i, &ctx.readfds)) {
event |= SELECT_READ;
Expand All @@ -141,6 +141,7 @@ namespace bee::lua_select {
if (event) {
findref(L, lua_upvalueindex(1), (net::fd_t)ctx.i);
lua_pushinteger(L, event);
++ctx.i;
return 2;
}
}
Expand Down

0 comments on commit b5bf364

Please sign in to comment.