From 01d663a30c79cf7d206b38fba58ed048a3516dd1 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 25 Sep 2015 15:16:25 +0200 Subject: mod_s2s: Account for connections that time out in connection count measure --- plugins/mod_s2s/mod_s2s.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'plugins/mod_s2s/mod_s2s.lua') 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]; -- cgit v1.2.3