From b17b81319300e94b7870e6e9c658f9528bd4c9b9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 23 Nov 2016 17:27:44 +0100 Subject: net.server_epoll: Use _SOCKETINVALID from LuaSocket --- net/server_epoll.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/server_epoll.lua b/net/server_epoll.lua index fcc7e99d..117fa1dc 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -21,6 +21,7 @@ local socket = require "socket"; local luasec = require "ssl"; local gettime = require "util.time".now; local createtable = require "util.table".create; +local _SOCKETINVALID = socket._SOCKETINVALID or -1; assert(socket.tcp6 and socket.tcp4, "Incompatible LuaSocket version"); @@ -157,7 +158,7 @@ function interface:getfd() if self.conn then return self.conn:getfd(); end - return -1; + return _SOCKETINVALID; end -- Get IP address -- cgit v1.2.3