aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-03-28 10:47:21 +0100
committerMatthew Wild <mwild1@gmail.com>2022-03-28 10:47:21 +0100
commit1426d52e39683e768700e63906034990e03f66d4 (patch)
treeef8eb68b01bb7b5430df65a1af9bbe32a910fd03
parentc50c315705e1c11070bd7210ecbdd3e395d59ad4 (diff)
downloadprosody-1426d52e39683e768700e63906034990e03f66d4.tar.gz
prosody-1426d52e39683e768700e63906034990e03f66d4.zip
mod_turn_external: Update status and friendlier handling of missing secret option (fixes #1727)
-rw-r--r--plugins/mod_turn_external.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_turn_external.lua b/plugins/mod_turn_external.lua
index fe8366be..ee50740c 100644
--- a/plugins/mod_turn_external.lua
+++ b/plugins/mod_turn_external.lua
@@ -8,7 +8,10 @@ local ttl = module:get_option_number("turn_external_ttl", 86400);
local tcp = module:get_option_boolean("turn_external_tcp", false);
local tls_port = module:get_option_number("turn_external_tls_port");
-if not secret then error("mod_" .. module.name .. " requires that 'turn_external_secret' be set") end
+if not secret then
+ module:log_status("error", "Failed to initialize: the 'turn_external_secret' option is not set in your configuration");
+ return;
+end
local services = set.new({ "stun-udp"; "turn-udp" });
if tcp then