# HG changeset patch # User Kim Alvefur # Date 1492303002 -7200 # Node ID acecf14132335358e1e815b6a8f77f5cad81ca5d # Parent 00d1fb300c74bc633bd6cd0069f561040fdd597d net.server_epoll: Reset onwritable before calling onconnect (fixes traceback if connection closed in onconnect) diff -r 00d1fb300c74 -r acecf1413233 net/server_epoll.lua --- 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