aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-07-08 15:12:44 +0200
committerKim Alvefur <zash@zash.se>2016-07-08 15:12:44 +0200
commit01e9c0fcaece58c4b70ffcb2e6f3df8e15f03f7b (patch)
tree6af93350c7e5736376dcee4101e54b940539a50e
parentc6a71be31ade7f4d5e23e7ca4189bb4d78cbbe83 (diff)
parenta18479bd7009a6b522ee8227d56dbb10165986dc (diff)
downloadprosody-01e9c0fcaece58c4b70ffcb2e6f3df8e15f03f7b.tar.gz
prosody-01e9c0fcaece58c4b70ffcb2e6f3df8e15f03f7b.zip
Merge 0.10->trunk
-rw-r--r--plugins/mod_c2s.lua10
-rw-r--r--plugins/mod_s2s/mod_s2s.lua10
2 files changed, 20 insertions, 0 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index a690e9be..703c4ac7 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -38,6 +38,16 @@ local stream_callbacks = { default_ns = "jabber:client" };
local listener = {};
local runner_callbacks = {};
+do
+ -- Connection counter resets to 0 on load and reload
+ -- Bump it up to current value
+ local count = 0;
+ for _ in pairs(sessions) do
+ count = count + 1;
+ end
+ measure_connections(count);
+end
+
--- Stream events handlers
local stream_xmlns_attr = {xmlns='urn:ietf:params:xml:ns:xmpp-streams'};
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index c0eaea01..fe674b55 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -46,6 +46,16 @@ local runner_callbacks = {};
local log = module._log;
+do
+ -- Connection counter resets to 0 on load and reload
+ -- Bump it up to current value
+ local count = 0;
+ for _ in pairs(sessions) do
+ count = count + 1;
+ end
+ measure_connections(count);
+end
+
--- Handle stanzas to remote domains
local bouncy_stanzas = { message = true, presence = true, iq = true };