aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/server_epoll.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 7aad9ede..6da05f0e 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -539,7 +539,10 @@ end
-- 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()