aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-05-02 19:20:57 +0200
committerKim Alvefur <zash@zash.se>2018-05-02 19:20:57 +0200
commitd727b92dc6330d4d5e30cac72c770621cd57cca4 (patch)
treeff3b69945185d87a609fd19abcce37b8d91ac674 /net
parent17a7b4529989553ff764917f84d42809aa0a3b06 (diff)
downloadprosody-d727b92dc6330d4d5e30cac72c770621cd57cca4.tar.gz
prosody-d727b92dc6330d4d5e30cac72c770621cd57cca4.zip
net.server_epoll: Retry retrieving peername once connected
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index e9d37426..4e2faf1b 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -540,6 +540,9 @@ end
-- Connected!
function interface:onconnect()
+ if self.conn and not self.peername then
+ self.peername, self.peerport = self.conn:getpeername();
+ end
self.onconnect = noop;
self:on("connect");
end