aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-03-27 03:41:24 +0200
committerKim Alvefur <zash@zash.se>2017-03-27 03:41:24 +0200
commit3c88f71ca098b1cf2a572a7abf8e41bef8493ba7 (patch)
tree86dc3951726fb6940d04b85c95d75c24cf847cc7 /net/server_epoll.lua
parent604b2b4af3ea743d3394977f8f43ab6fffdb0c1e (diff)
downloadprosody-3c88f71ca098b1cf2a572a7abf8e41bef8493ba7.tar.gz
prosody-3c88f71ca098b1cf2a572a7abf8e41bef8493ba7.zip
net.server_epoll: Check write buffer for remaining data to write when closing
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 38620a21..3bb92d14 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -384,7 +384,7 @@ interface.send = interface.write;
-- Close, possibly after writing is done
function interface:close()
- if self._wantwrite then
+ if self.writebuffer and self.writebuffer[1] then
self:setflags(false, true); -- Flush final buffer contents
self.write, self.send = noop, noop; -- No more writing
log("debug", "Close %s after writing", tostring(self));