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
commit36da2e1aabdd130123e43060a3e606361299690f (patch)
tree38547ff7fc7bcb20d06acee3b7e6ed9ed1a87b66
parent09f775430279a2e477b3880811432801d0a492a0 (diff)
downloadprosody-36da2e1aabdd130123e43060a3e606361299690f.tar.gz
prosody-36da2e1aabdd130123e43060a3e606361299690f.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()