Software /
code /
prosody
Diff
plugins/mod_s2s/mod_s2s.lua @ 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 |
parent | 6846:7eb166fa1f26 |
child | 6861:39789f1669cb |
child | 6901:ccc452767ec6 |
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];