Diff

net/server_epoll.lua @ 10282:05ba04725a15

net.server_epoll: Add some timeout related logging
author Kim Alvefur <zash@zash.se>
date Sun, 29 Sep 2019 15:18:40 +0200
parent 10280:6b8b255f1d10
child 10283:dff360d00dfa
line wrap: on
line diff
--- a/net/server_epoll.lua	Sun Sep 29 15:05:17 2019 +0200
+++ b/net/server_epoll.lua	Sun Sep 29 15:18:40 2019 +0200
@@ -261,8 +261,10 @@
 	else
 		self._readtimeout = addtimer(t, function ()
 			if self:on("readtimeout") then
+				self:debug("Read timeout, handled");
 				return cfg.read_timeout;
 			else
+				self:debug("Read timeout, fatal");
 				self:on("disconnect", "read timeout");
 				self:destroy();
 			end
@@ -284,6 +286,7 @@
 		self._writetimeout:reschedule(gettime() + t);
 	else
 		self._writetimeout = addtimer(t, function ()
+			self:debug("Write timeout");
 			self:on("disconnect", "write timeout");
 			self:destroy();
 		end);