aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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