From 1aac758bba1f4a929740055b6ab7c418cd786502 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 6 Oct 2015 15:27:39 +0200 Subject: mod_websocket: Import util.timer and session close timeout config option (thanks fairuz) --- plugins/mod_websocket.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua index d3252980..897d2709 100644 --- a/plugins/mod_websocket.lua +++ b/plugins/mod_websocket.lua @@ -7,6 +7,7 @@ module:set_global(); +local add_task = require "util.timer".add_task; local add_filter = require "util.filters".add_filter; local sha1 = require "util.hashes".sha1; local base64 = require "util.encodings".base64.encode; @@ -24,6 +25,7 @@ local parse_close = websocket_frames.parse_close; local t_concat = table.concat; +local stream_close_timeout = module:get_option_number("c2s_close_timeout", 5); local consider_websocket_secure = module:get_option_boolean("consider_websocket_secure"); local cross_domain = module:get_option("cross_domain_websocket"); if cross_domain then -- cgit v1.2.3 From bc5cd404ab862cd95d125da13c5307a254795bad Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 6 Oct 2015 15:30:25 +0200 Subject: mod_websocket: Silence luacheck warnings --- plugins/mod_websocket.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_websocket.lua b/plugins/mod_websocket.lua index 897d2709..418cd846 100644 --- a/plugins/mod_websocket.lua +++ b/plugins/mod_websocket.lua @@ -4,6 +4,7 @@ -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- +-- luacheck: ignore 431/log module:set_global(); @@ -130,7 +131,7 @@ local function filter_open_close(data) return data; end -function handle_request(event, path) +function handle_request(event) local request, response = event.request, event.response; local conn = response.conn; -- cgit v1.2.3 From 617cacab71dfebcb4b41bc9c0a5f5492c4385f1c Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 11 Oct 2015 14:03:53 +0200 Subject: mod_s2s: Fire global event for stream features where the remote server has not sent the 'to' stream attribute --- plugins/mod_s2s/mod_s2s.lua | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua index 1ecb75da..2fda63ce 100644 --- a/plugins/mod_s2s/mod_s2s.lua +++ b/plugins/mod_s2s/mod_s2s.lua @@ -349,6 +349,7 @@ function stream_callbacks.streamopened(session, attr) hosts[to].events.fire_event("s2s-stream-features", { origin = session, features = features }); else (session.log or log)("warn", "No 'to' on stream header from %s means we can't offer any features", from or session.ip or "unknown host"); + fire_global_event("s2s-stream-features-legacy", { origin = session, features = features }); end if ( session.type == "s2sin" or session.type == "s2sout" ) or features.tags[1] then -- cgit v1.2.3