From c8bbcabaf7597f13bace9e5aefc98ecb9e172796 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(-) (limited to 'net') 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