diff options
author | Kim Alvefur <zash@zash.se> | 2018-05-02 19:29:31 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2018-05-02 19:29:31 +0200 |
commit | 3cc1ca831f9d6e0dd56b7e7d265e796d9305d915 (patch) | |
tree | 0365a23a4ea722c4e09acf4e1360223f9d212480 /net | |
parent | d727b92dc6330d4d5e30cac72c770621cd57cca4 (diff) | |
download | prosody-3cc1ca831f9d6e0dd56b7e7d265e796d9305d915.tar.gz prosody-3cc1ca831f9d6e0dd56b7e7d265e796d9305d915.zip |
net.server_epoll: Guard against connection missing the getpeername method (thanks LuaSec)
Diffstat (limited to 'net')
-rw-r--r-- | net/server_epoll.lua | 2 |
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; |