Diff

net/server_epoll.lua @ 9594:dcf466e04f81

net.server_epoll: Use method to update peername on connect
author Kim Alvefur <zash@zash.se>
date Mon, 29 Oct 2018 02:13:09 +0100
parent 9587:42eedef517dc
child 9666:270216874740
line wrap: on
line diff
--- a/net/server_epoll.lua	Sun Oct 28 18:22:17 2018 +0100
+++ b/net/server_epoll.lua	Mon Oct 29 02:13:09 2018 +0100
@@ -612,9 +612,7 @@
 
 -- Connected!
 function interface:onconnect()
-	if self.conn and not self.peername and self.conn.getpeername then
-		self.peername, self.peerport = self.conn:getpeername();
-	end
+	self:updatenames();
 	self.onconnect = noop;
 	self:on("connect");
 end