aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
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 47d19350..3ce1be5a 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -334,6 +334,7 @@ end
-- Called when socket is writable
function interface:onwritable()
+ self:onconnect();
local buffer = self.writebuffer;
local data = t_concat(buffer);
local ok, err, partial = self.conn:send(data);
@@ -344,7 +345,6 @@ function interface:onwritable()
end
self:setwritetimeout(false);
self:ondrain(); -- Be aware of writes in ondrain
- self:onconnect();
return;
elseif partial then
buffer[1] = data:sub(partial+1);