aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_bosh.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-06-08 18:08:18 +0100
committerMatthew Wild <mwild1@gmail.com>2013-06-08 18:08:18 +0100
commitdb42f4e220c074f519e59de7f6521f0923907749 (patch)
tree66169bf766e2f47cb11abfc891fccae6e317d982 /plugins/mod_bosh.lua
parent74698b8dcb22d6f7a649986ad70df7a4ee197b5b (diff)
downloadprosody-db42f4e220c074f519e59de7f6521f0923907749.tar.gz
prosody-db42f4e220c074f519e59de7f6521f0923907749.zip
mod_bosh: Make waiting_requests and dead_sessions shared to preserve across reloads
Diffstat (limited to 'plugins/mod_bosh.lua')
-rw-r--r--plugins/mod_bosh.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua
index d8109602..e3a1050b 100644
--- a/plugins/mod_bosh.lua
+++ b/plugins/mod_bosh.lua
@@ -62,7 +62,7 @@ local os_time = os.time;
local sessions, inactive_sessions = module:shared("sessions", "inactive_sessions");
-- Used to respond to idle sessions (those with waiting requests)
-local waiting_requests = {};
+local waiting_requests = module:shared("waiting_requests");
function on_destroy_request(request)
log("debug", "Request destroyed: %s", tostring(request));
waiting_requests[request] = nil;
@@ -397,7 +397,7 @@ function stream_callbacks.error(context, error)
end
end
-local dead_sessions = {};
+local dead_sessions = module:shared("dead_sessions");
function on_timer()
-- log("debug", "Checking for requests soon to timeout...");
-- Identify requests timing out within the next few seconds