From ad56ba387e3173a92387e24767de33346d9599ca Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 16 Apr 2017 02:36:42 +0200 Subject: net.server_epoll: Reset onwritable before calling onconnect (fixes traceback if connection closed in onconnect) --- net/server_epoll.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net') 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 -- cgit v1.2.3