aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-05-02 19:29:31 +0200
committerKim Alvefur <zash@zash.se>2018-05-02 19:29:31 +0200
commit3cc1ca831f9d6e0dd56b7e7d265e796d9305d915 (patch)
tree0365a23a4ea722c4e09acf4e1360223f9d212480 /net/server_epoll.lua
parentd727b92dc6330d4d5e30cac72c770621cd57cca4 (diff)
downloadprosody-3cc1ca831f9d6e0dd56b7e7d265e796d9305d915.tar.gz
prosody-3cc1ca831f9d6e0dd56b7e7d265e796d9305d915.zip
net.server_epoll: Guard against connection missing the getpeername method (thanks LuaSec)
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 4e2faf1b..564444f8 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -540,7 +540,7 @@ end
-- Connected!
function interface:onconnect()
- if self.conn and not self.peername then
+ if self.conn and not self.peername and self.conn.getpeername then
self.peername, self.peerport = self.conn:getpeername();
end
self.onconnect = noop;