aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index f4ec54f6..4dc43bfa 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -141,7 +141,10 @@ function interface:on(what, ...)
end
function interface:getfd()
- return self.conn:getfd();
+ if self.conn then
+ return self.conn:getfd();
+ end
+ return -1;
end
function interface:ip()