aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-09-25 15:16:25 +0200
committerKim Alvefur <zash@zash.se>2015-09-25 15:16:25 +0200
commit01d663a30c79cf7d206b38fba58ed048a3516dd1 (patch)
treea3264f297c742b9d46c02ae65199ecb057c8964d /plugins/mod_s2s
parentfabb7c056162683bf2da290348bf3c1efaa9e672 (diff)
downloadprosody-01d663a30c79cf7d206b38fba58ed048a3516dd1.tar.gz
prosody-01d663a30c79cf7d206b38fba58ed048a3516dd1.zip
mod_s2s: Account for connections that time out in connection count measure
Diffstat (limited to 'plugins/mod_s2s')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index b44000a6..1ecb75da 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -611,6 +611,11 @@ function listener.onstatus(conn, status)
end
end
+function listener.ontimeout(conn)
+ -- Called instead of onconnect when the connection times out
+ measure_connections(1);
+end
+
function listener.ondisconnect(conn, err)
measure_connections(-1);
local session = sessions[conn];