# HG changeset patch # User Kim Alvefur # Date 1569762125 -7200 # Node ID 6b8b255f1d10dabc251811aef329a6291886d810 # Parent 0e1701197722b598918b5a1f46c68717a4753f06 net.server_epoll: Add debug logging for various connection events diff -r 0e1701197722 -r 6b8b255f1d10 net/server_epoll.lua --- a/net/server_epoll.lua Sun Sep 29 15:00:28 2019 +0200 +++ b/net/server_epoll.lua Sun Sep 29 15:02:05 2019 +0200 @@ -630,10 +630,12 @@ end function interface:pause() + self:debug("Pause reading"); return self:set(false); end function interface:resume() + self:debug("Resume reading"); return self:set(true); end @@ -663,12 +665,14 @@ end function interface:pause_writes() + self:debug("Pause writes"); self._write_lock = true; self:setwritetimeout(false); self:set(nil, false); end function interface:resume_writes() + self:debug("Resume writes"); self._write_lock = nil; if self.writebuffer[1] then self:setwritetimeout(); @@ -678,6 +682,7 @@ -- Connected! function interface:onconnect() + self:debug("Connected"); self:updatenames(); self.onconnect = noop; self:on("connect"); @@ -784,6 +789,7 @@ -- Dump all data from one connection into another local function link(from, to) + from:debug("Linking to %s", to.id); from.listeners = setmetatable({ onincoming = function (_, data) from:pause();