Changeset

12437:9f5d0b77e3df 0.12

mod_turn_external: Update status and friendlier handling of missing secret option (fixes #1727)
author Matthew Wild <mwild1@gmail.com>
date Mon, 28 Mar 2022 10:47:21 +0100
parents 12435:1ee72c0013f3
children 12438:a698f65df453
files plugins/mod_turn_external.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_turn_external.lua	Sun Mar 27 14:05:56 2022 +0200
+++ b/plugins/mod_turn_external.lua	Mon Mar 28 10:47:21 2022 +0100
@@ -8,7 +8,10 @@
 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