aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-11-23 17:27:44 +0100
committerKim Alvefur <zash@zash.se>2016-11-23 17:27:44 +0100
commitc8bbcabaf7597f13bace9e5aefc98ecb9e172796 (patch)
tree30241ab8f2dc82b7db4e939cf486b8fea949f039 /net/server_epoll.lua
parent5759ed4bd315c197324c65375be019040d273203 (diff)
downloadprosody-c8bbcabaf7597f13bace9e5aefc98ecb9e172796.tar.gz
prosody-c8bbcabaf7597f13bace9e5aefc98ecb9e172796.zip
net.server_epoll: Use _SOCKETINVALID from LuaSocket
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua3
1 files changed, 2 insertions, 1 deletions
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