Software /
code /
prosody
Diff
net/server_epoll.lua @ 10638:92918212ee83
net.server_epoll: Different error to distinguish connection timeout
This mirrors what server_event does.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 01 Feb 2020 00:33:08 +0100 |
parent | 10589:3540118699cf |
child | 10649:228277be4a28 |
line wrap: on
line diff
--- 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;