# HG changeset patch # User Kim Alvefur # Date 1471528851 -7200 # Node ID 846fdbbc62ba26d5feaa1d1d2e28be31e6dbc6b6 # Parent b64218c816de6d7f021b707ff587e7e99e78526f net.server_epoll: Return something as FD when no connection exists diff -r b64218c816de -r 846fdbbc62ba net/server_epoll.lua --- a/net/server_epoll.lua Thu Aug 18 15:57:22 2016 +0200 +++ b/net/server_epoll.lua Thu Aug 18 16:00:51 2016 +0200 @@ -141,7 +141,10 @@ end function interface:getfd() - return self.conn:getfd(); + if self.conn then + return self.conn:getfd(); + end + return -1; end function interface:ip()