--- 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;