Changeset

6848:32327c80710b

mod_s2s: Account for connections that time out in connection count measure
author Kim Alvefur <zash@zash.se>
date Fri, 25 Sep 2015 15:16:25 +0200
parents 6846:7eb166fa1f26
children 6849:0455b9686e16
files plugins/mod_s2s/mod_s2s.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_s2s/mod_s2s.lua	Thu Sep 24 20:05:23 2015 +0200
+++ b/plugins/mod_s2s/mod_s2s.lua	Fri Sep 25 15:16:25 2015 +0200
@@ -611,6 +611,11 @@
 	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];