aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-04-16 02:36:42 +0200
committerKim Alvefur <zash@zash.se>2017-04-16 02:36:42 +0200
commitad56ba387e3173a92387e24767de33346d9599ca (patch)
treef82e27893a88fe18b9655a6bc2aefd1324399d6a /net
parent28ff66d12722f348b8afe7eebd018c5a0e4281a7 (diff)
downloadprosody-ad56ba387e3173a92387e24767de33346d9599ca.tar.gz
prosody-ad56ba387e3173a92387e24767de33346d9599ca.zip
net.server_epoll: Reset onwritable before calling onconnect (fixes traceback if connection closed in onconnect)
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index f1e25f44..5342ca9d 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -533,12 +533,12 @@ end
-- Connected!
function interface:onconnect()
+ self.onwriteable = nil;
+ self:setflags(true, false);
if not self._connected then
self._connected = true;
self:on("connect");
end
- self.onwriteable = nil;
- self:setflags(true, false);
return self:onwriteable();
end