aboutsummaryrefslogtreecommitdiffstats
path: root/net
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
commit4b973422dd88555a4c8e9e878f006ccbfb2de2fe (patch)
tree0365a23a4ea722c4e09acf4e1360223f9d212480 /net
parent9bb53a64b8ce62ce09e51e9b4237de4fbdeaffdf (diff)
downloadprosody-4b973422dd88555a4c8e9e878f006ccbfb2de2fe.tar.gz
prosody-4b973422dd88555a4c8e9e878f006ccbfb2de2fe.zip
net.server_epoll: Guard against connection missing the getpeername method (thanks LuaSec)
Diffstat (limited to 'net')
-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;