Software /
code /
prosody
Changeset
8007:67f8954875a4
net.server_epoll: Check write buffer for remaining data to write when closing
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 27 Mar 2017 03:41:24 +0200 |
parents | 8006:be374a5778f3 |
children | 8008:62ed3795be13 |
files | net/server_epoll.lua |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_epoll.lua Mon Mar 27 03:40:24 2017 +0200 +++ b/net/server_epoll.lua Mon Mar 27 03:41:24 2017 +0200 @@ -384,7 +384,7 @@ -- 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));