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 | 4b973422dd88555a4c8e9e878f006ccbfb2de2fe (patch) | |
tree | 0365a23a4ea722c4e09acf4e1360223f9d212480 /net | |
parent | 9bb53a64b8ce62ce09e51e9b4237de4fbdeaffdf (diff) | |
download | prosody-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.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; |