Software /
code /
prosody
Changeset
8541:8186114329d6
net.server_epoll: Remove special casing for having sent an empty write buffer because the wantwrite flag must be unset regardless
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 24 Feb 2018 14:36:44 +0100 |
parents | 8540:ba9fd886b34d |
children | 8542:8c39ec8e6018 |
files | net/server_epoll.lua |
diffstat | 1 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_epoll.lua Sat Feb 24 13:46:16 2018 +0100 +++ b/net/server_epoll.lua Sat Feb 24 14:36:44 2018 +0100 @@ -338,14 +338,12 @@ local data = t_concat(buffer); local ok, err, partial = self.conn:send(data); if ok then - if data ~= "" then - for i = #buffer, 1, -1 do - buffer[i] = nil; - end - self:setflags(nil, false); - self:setwritetimeout(false); - self:ondrain(); -- Be aware of writes in ondrain + self:setflags(nil, false); + for i = #buffer, 1, -1 do + buffer[i] = nil; end + self:setwritetimeout(false); + self:ondrain(); -- Be aware of writes in ondrain self:onconnect(); return; elseif partial then