mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 21:27:38 +03:00
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.
This commit is contained in:
parent
31eb61f22a
commit
532fbe0687
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue