Mercurial > prosody-hg
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 |
| parents | 7eb166fa1f26 |
| children | 39789f1669cb 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];
