Software /
code /
prosody
Diff
net/server_epoll.lua @ 10300:78f2a3a9c537
net.server_epoll: Return early when attepting to set write lock state to current state
Reduces needless duplication of work and log messages..
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 05 Oct 2019 15:22:59 +0200 |
parent | 10289:8c59b20f71dc |
child | 10305:2fadbf209678 |
line wrap: on
line diff
--- a/net/server_epoll.lua Thu Oct 03 16:38:46 2019 +0100 +++ b/net/server_epoll.lua Sat Oct 05 15:22:59 2019 +0200 @@ -668,6 +668,9 @@ end function interface:pause_writes() + if self._write_lock then + return + end self:debug("Pause writes"); self._write_lock = true; self:setwritetimeout(false); @@ -675,6 +678,9 @@ end function interface:resume_writes() + if not self._write_lock then + return + end self:debug("Resume writes"); self._write_lock = nil; if self.writebuffer[1] then