Comparison

net/server_epoll.lua @ 8777:2bfe963f3041

net.server_epoll: Retry retrieving peername once connected
author Kim Alvefur <zash@zash.se>
date Wed, 02 May 2018 19:20:57 +0200
parent 8776:e7d4344e0fea
child 8778:0364454bdd77
comparison
equal deleted inserted replaced
8776:e7d4344e0fea 8777:2bfe963f3041
538 end); 538 end);
539 end 539 end
540 540
541 -- Connected! 541 -- Connected!
542 function interface:onconnect() 542 function interface:onconnect()
543 if self.conn and not self.peername then
544 self.peername, self.peerport = self.conn:getpeername();
545 end
543 self.onconnect = noop; 546 self.onconnect = noop;
544 self:on("connect"); 547 self:on("connect");
545 end 548 end
546 549
547 local function addserver(addr, port, listeners, pattern, tls) 550 local function addserver(addr, port, listeners, pattern, tls)