Software /
code /
prosody
Comparison
net/server_epoll.lua @ 11701:a3572205c5bf
net.server_epoll: Skip reset of read timeout when not reading
Should avoid rare but needless timer interactions
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 17 Jul 2021 14:51:50 +0200 |
parent | 11700:79d30de13fdb |
child | 11702:c206430e2643 |
comparison
equal
deleted
inserted
replaced
11700:79d30de13fdb | 11701:a3572205c5bf |
---|---|
456 self:setreadtimeout(false); | 456 self:setreadtimeout(false); |
457 self:pausefor(cost); | 457 self:pausefor(cost); |
458 return; | 458 return; |
459 end | 459 end |
460 end | 460 end |
461 if self._wantread and self.conn:dirty() then | 461 if not self._wantread then return end |
462 if self.conn:dirty() then | |
462 self:setreadtimeout(false); | 463 self:setreadtimeout(false); |
463 self:pausefor(cfg.read_retry_delay); | 464 self:pausefor(cfg.read_retry_delay); |
464 else | 465 else |
465 self:setreadtimeout(); | 466 self:setreadtimeout(); |
466 end | 467 end |