aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-02-03 17:36:55 +0100
committerKim Alvefur <zash@zash.se>2018-02-03 17:36:55 +0100
commit76ba5218c221ae8d58edddf8b4097966f2e18180 (patch)
tree38547ff7fc7bcb20d06acee3b7e6ed9ed1a87b66
parent5da6f87a495a575c8f688db3903d3e76a5f65e4f (diff)
downloadprosody-76ba5218c221ae8d58edddf8b4097966f2e18180.tar.gz
prosody-76ba5218c221ae8d58edddf8b4097966f2e18180.zip
server_epoll: Restore mark on connections which had the onconnect handler called so it is only done once
-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()