diff options
author | Kim Alvefur <zash@zash.se> | 2020-10-31 00:33:29 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-10-31 00:33:29 +0100 |
commit | 532fbe06878da9f0b10816be662f6aa7463b8f84 (patch) | |
tree | f17c429629842bdb88533c1723f954162b1475a4 | |
parent | 31eb61f22ab37174e239038e44c5d7b40519afec (diff) | |
download | prosody-532fbe06878da9f0b10816be662f6aa7463b8f84.tar.gz prosody-532fbe06878da9f0b10816be662f6aa7463b8f84.zip |
net.server_epoll: Ensure timeout after closing
This should make sure that if there's data left to be written when
closing a connection, there's also a timeout so that it doesn't wait
forever.
-rw-r--r-- | net/server_epoll.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 25a50373..6618c204 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -514,6 +514,7 @@ interface.send = interface.write; function interface:close() if self.writebuffer and self.writebuffer[1] then self:set(false, true); -- Flush final buffer contents + self:setwritetimeout(); self.write, self.send = noop, noop; -- No more writing self:debug("Close after writing remaining buffered data"); self.ondrain = interface.close; |