diff options
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r-- | net/server_epoll.lua | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index fa79837d..f73b1a8c 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -250,13 +250,9 @@ function interface:onwriteable() for i = #buffer, 1, -1 do buffer[i] = nil; end - self:ondrain(); - if not buffer[1] then - self:setflags(nil, false); - self:setwritetimeout(false); - else - self:setwritetimeout(); - end + self:setflags(nil, false); + self:setwritetimeout(false); + self:ondrain(); -- Be aware of writes in ondrain elseif partial then buffer[1] = data:sub(partial+1) for i = #buffer, 2, -1 do |