diff options
author | Kim Alvefur <zash@zash.se> | 2016-08-18 16:00:51 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-08-18 16:00:51 +0200 |
commit | b87569cf946490e49e471ce7efaaf0f2779b0d8c (patch) | |
tree | bb94dc97aad01e20856c59311717259ce62c8b9a /net/server_epoll.lua | |
parent | 0d62fa9d6938e623a693160f2a0fc32dda1e816d (diff) | |
download | prosody-b87569cf946490e49e471ce7efaaf0f2779b0d8c.tar.gz prosody-b87569cf946490e49e471ce7efaaf0f2779b0d8c.zip |
net.server_epoll: Return something as FD when no connection exists
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r-- | net/server_epoll.lua | 5 |
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() |