diff options
author | Kim Alvefur <zash@zash.se> | 2019-09-29 15:02:05 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-09-29 15:02:05 +0200 |
commit | 6e360554ffaa391f23a9e0bb93adde3f1bd32020 (patch) | |
tree | fbfcdcef318201c5f6c7ad96226b25616f107375 /net | |
parent | 315959a49a675d2f95610828ddcc66d2f1fb535c (diff) | |
download | prosody-6e360554ffaa391f23a9e0bb93adde3f1bd32020.tar.gz prosody-6e360554ffaa391f23a9e0bb93adde3f1bd32020.zip |
net.server_epoll: Add debug logging for various connection events
Diffstat (limited to 'net')
-rw-r--r-- | net/server_epoll.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 633b038c..c3354006 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -630,10 +630,12 @@ function interface:init() 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 @@ function interface:setlimit(Bps) 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 @@ end -- Connected! function interface:onconnect() + self:debug("Connected"); self:updatenames(); self.onconnect = noop; self:on("connect"); @@ -784,6 +789,7 @@ end; -- 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(); |