Software /
code /
prosody
Diff
net/server_epoll.lua @ 8091:acecf1413233
net.server_epoll: Reset onwritable before calling onconnect (fixes traceback if connection closed in onconnect)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 16 Apr 2017 02:36:42 +0200 |
parent | 8008:62ed3795be13 |
child | 8271:c09deab9989e |
line wrap: on
line diff
--- a/net/server_epoll.lua Sat Apr 15 02:27:43 2017 +0200 +++ b/net/server_epoll.lua Sun Apr 16 02:36:42 2017 +0200 @@ -533,12 +533,12 @@ -- 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