diff options
author | Kim Alvefur <zash@zash.se> | 2016-11-23 17:27:44 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2016-11-23 17:27:44 +0100 |
commit | b17b81319300e94b7870e6e9c658f9528bd4c9b9 (patch) | |
tree | 30241ab8f2dc82b7db4e939cf486b8fea949f039 | |
parent | fd4206fdb2dc539efb8c2275dbaf3599a72c4933 (diff) | |
download | prosody-b17b81319300e94b7870e6e9c658f9528bd4c9b9.tar.gz prosody-b17b81319300e94b7870e6e9c658f9528bd4c9b9.zip |
net.server_epoll: Use _SOCKETINVALID from LuaSocket
-rw-r--r-- | net/server_epoll.lua | 3 |
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 |