Software /
code /
prosody
Changeset
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 |
parents | 10299:fd94721186b8 |
children | 10301:3123a13cf577 |
files | net/server_epoll.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
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