aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 897bd111..fa247191 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -299,7 +299,7 @@ function interface:setwritetimeout(t)
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 @@ end
-- Connected!
function interface:onconnect()
+ self._connected = true;
self:updatenames();
self:debug("Connected (%s)", self);
self.onconnect = noop;