net.server_epoll: Return something as FD when no connection exists
authorKim Alvefur <zash@zash.se>
Thu, 18 Aug 2016 16:00:51 +0200
changeset 7589 846fdbbc62ba
parent 7588 b64218c816de
child 7590 ff81a34bffb0
net.server_epoll: Return something as FD when no connection exists
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()