From b466f525b07225b942532b54293891526f281e64 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 15 Nov 2012 13:18:41 -0500 Subject: mod_bosh: Share sessions and inactive_sessions tables --- plugins/mod_bosh.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 350d6b0c..1270a080 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -70,8 +70,8 @@ end local t_insert, t_remove, t_concat = table.insert, table.remove, table.concat; local os_time = os.time; -local sessions = {}; -local inactive_sessions = {}; -- Sessions which have no open requests +-- All sessions, and sessions that have no requests open +local sessions, inactive_sessions = module:shared("sessions", "inactive_sessions"); -- Used to respond to idle sessions (those with waiting requests) local waiting_requests = {}; -- cgit v1.2.3 From e4c43fa10a7b69b7ce5bfa433d33132447fa0223 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 15 Nov 2012 13:24:10 -0500 Subject: mod_http: Add 'http_host' option to change the HTTP virtual host that this host is accessible at (e.g. allows mapping a host to '127.0.0.1') --- plugins/mod_http.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua index 22441faa..a7b4a45f 100644 --- a/plugins/mod_http.lua +++ b/plugins/mod_http.lua @@ -67,7 +67,7 @@ function moduleapi.http_url(module, app_name, default_path) end function module.add_host(module) - local host = module.host; + local host = module:get_option_string("http_host", module.host); local apps = {}; module.environment.apps = apps; local function http_app_added(event) -- cgit v1.2.3