diff options
-rw-r--r-- | util-src/poll.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util-src/poll.c b/util-src/poll.c index 502c5762..293c8c2b 100644 --- a/util-src/poll.c +++ b/util-src/poll.c @@ -351,6 +351,10 @@ int Lgetfd(lua_State *L) { int Lgc(lua_State *L) { struct Lpoll_state *state = luaL_checkudata(L, 1, STATE_MT); + if(state->epoll_fd != -1) { + return 0; + } + if(close(state->epoll_fd) == 0) { state->epoll_fd = -1; } |