diff options
author | Kim Alvefur <zash@zash.se> | 2017-04-16 02:36:42 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-04-16 02:36:42 +0200 |
commit | 5d4b489c3c77347b9050fae4d6e01a8649817084 (patch) | |
tree | f82e27893a88fe18b9655a6bc2aefd1324399d6a | |
parent | c9db076c158fec5a67bc3830a3fb7718cbd61c54 (diff) | |
download | prosody-5d4b489c3c77347b9050fae4d6e01a8649817084.tar.gz prosody-5d4b489c3c77347b9050fae4d6e01a8649817084.zip |
net.server_epoll: Reset onwritable before calling onconnect (fixes traceback if connection closed in onconnect)
-rw-r--r-- | net/server_epoll.lua | 4 |
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 |