aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl/check.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-04-13 18:46:11 +0100
committerMatthew Wild <mwild1@gmail.com>2022-04-13 18:46:11 +0100
commit89934124b819b592f5a56f7135c3b037c373d919 (patch)
treecd3d613112000494c8b9eab31ab84b8d0660177c /util/prosodyctl/check.lua
parente98f777bb2ef9156e8b19f554b2403249c95a4b7 (diff)
downloadprosody-89934124b819b592f5a56f7135c3b037c373d919.tar.gz
prosody-89934124b819b592f5a56f7135c3b037c373d919.zip
util.prosodyctl: check turn: ensure a result is always returned from a check (thanks eTaurus)
Diffstat (limited to 'util/prosodyctl/check.lua')
-rw-r--r--util/prosodyctl/check.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/prosodyctl/check.lua b/util/prosodyctl/check.lua
index 4b09ad8d..cdea04b9 100644
--- a/util/prosodyctl/check.lua
+++ b/util/prosodyctl/check.lua
@@ -153,7 +153,7 @@ local function check_turn_service(turn_service, ping_service)
local alloc_response, err = receive_packet();
if not alloc_response then
result.error = "TURN server did not response to allocation request: "..err;
- return;
+ return result;
elseif alloc_response:is_err_resp() then
result.error = ("TURN allocation failed: %d (%s)"):format(alloc_response:get_error());
return result;
@@ -245,7 +245,7 @@ local function check_turn_service(turn_service, ping_service)
local pong_data = ping_response:get_attribute("data");
if not pong_data then
result.error = "No data relayed from remote server";
- return;
+ return result;
end
local pong = stun.new_packet():deserialize(pong_data);