# HG changeset patch # User Kim Alvefur # Date 1580513588 -3600 # Node ID 92918212ee83af119fadc167c05a923180d1797e # Parent aa304109fa1bbf48c7f387a45249359fdc7606c9 net.server_epoll: Different error to distinguish connection timeout This mirrors what server_event does. diff -r aa304109fa1b -r 92918212ee83 net/server_epoll.lua --- a/net/server_epoll.lua Thu Jan 30 14:22:21 2020 +0100 +++ b/net/server_epoll.lua Sat Feb 01 00:33:08 2020 +0100 @@ -299,7 +299,7 @@ else self._writetimeout = addtimer(t, function () self:noise("Write timeout"); - self:on("disconnect", "write timeout"); + self:on("disconnect", self._connected and "write timeout" or "connection timeout"); self:destroy(); end); end @@ -711,6 +711,7 @@ -- Connected! function interface:onconnect() + self._connected = true; self:updatenames(); self:debug("Connected (%s)", self); self.onconnect = noop;