Software /
code /
prosody
Comparison
net/server_epoll.lua @ 10417:d8a0b0d21c81
net.server_epoll: Improve read timeout debug messages
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 19 Oct 2019 20:11:21 +0200 |
parent | 10416:6af8c812a885 |
child | 10418:c8aa66595072 |
comparison
equal
deleted
inserted
replaced
10416:6af8c812a885 | 10417:d8a0b0d21c81 |
---|---|
259 if self._readtimeout then | 259 if self._readtimeout then |
260 self._readtimeout:reschedule(gettime() + t); | 260 self._readtimeout:reschedule(gettime() + t); |
261 else | 261 else |
262 self._readtimeout = addtimer(t, function () | 262 self._readtimeout = addtimer(t, function () |
263 if self:on("readtimeout") then | 263 if self:on("readtimeout") then |
264 self:debug("Read timeout, handled"); | 264 self:debug("Read timeout handled"); |
265 return cfg.read_timeout; | 265 return cfg.read_timeout; |
266 else | 266 else |
267 self:debug("Read timeout, fatal"); | 267 self:debug("Read timeout not handled, disconnecting"); |
268 self:on("disconnect", "read timeout"); | 268 self:on("disconnect", "read timeout"); |
269 self:destroy(); | 269 self:destroy(); |
270 end | 270 end |
271 end); | 271 end); |
272 end | 272 end |