# HG changeset patch # User Kim Alvefur # Date 1471529178 -7200 # Node ID 125e4f2e0b65400a80d3988b6faffb162ed7d8fc # Parent fd6ca110edce26887efb7f577d98ed0df9fb3acf net.server_epoll: Return early on successful write diff -r fd6ca110edce -r 125e4f2e0b65 net/server_epoll.lua --- a/net/server_epoll.lua Thu Aug 18 16:05:18 2016 +0200 +++ b/net/server_epoll.lua Thu Aug 18 16:06:18 2016 +0200 @@ -289,6 +289,7 @@ self:setflags(nil, false); self:setwritetimeout(false); self:ondrain(); -- Be aware of writes in ondrain + return; elseif partial then buffer[1] = data:sub(partial+1) for i = #buffer, 2, -1 do