Changeset

8507:71ef6d509105

server_epoll: Restore mark on connections which had the onconnect handler called so it is only done once
author Kim Alvefur <zash@zash.se>
date Sat, 03 Feb 2018 17:36:55 +0100
parents 8506:174fd716c9fa
children 8518:0de0018bdf91
files net/server_epoll.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_epoll.lua	Fri Feb 02 23:46:00 2018 +0100
+++ b/net/server_epoll.lua	Sat Feb 03 17:36:55 2018 +0100
@@ -539,7 +539,10 @@
 -- Connected!
 function interface:onconnect()
 	self:setflags(true, false);
-	self:on("connect");
+	if not self._connected then
+		self._connected = true;
+		self:on("connect");
+	end
 end
 
 function interface:onfirstwritable()