aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-18 16:00:51 +0200
committerKim Alvefur <zash@zash.se>2016-08-18 16:00:51 +0200
commit816de3fe24ca6dee46efa53c0d1e7e2cc70a2f5a (patch)
treebb94dc97aad01e20856c59311717259ce62c8b9a /net
parent02d7dea382e9b0469ba107282b3b31bee0ddcf6d (diff)
downloadprosody-816de3fe24ca6dee46efa53c0d1e7e2cc70a2f5a.tar.gz
prosody-816de3fe24ca6dee46efa53c0d1e7e2cc70a2f5a.zip
net.server_epoll: Return something as FD when no connection exists
Diffstat (limited to 'net')
-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()