Changeset

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
parents 10281:f90abf142d53
children 10283:dff360d00dfa
files net/server_epoll.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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);