aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2025-03-11 18:37:16 +0000
committerMatthew Wild <mwild1@gmail.com>2025-03-11 18:37:16 +0000
commit5b4624137d81ba3bf6a7d2188cee5979553d19d3 (patch)
tree5ed856a870600268e2fb06b1a06c44681cff725d /plugins
parent5b1d83614b7c00a61a10cc5089c922a66148d4df (diff)
downloadprosody-5b4624137d81ba3bf6a7d2188cee5979553d19d3.tar.gz
prosody-5b4624137d81ba3bf6a7d2188cee5979553d19d3.zip
mod_c2s: Code formatting change
Although we do sometimes use single-line if blocks, I'm expanding this one to make it easier to compare with the duplicated (but modified) code in mod_websocket that we plan to de-duplicate one day.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_c2s.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index a9417368..c1fbdb9e 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -252,12 +252,16 @@ local function session_close(session, reason)
if not session.destroyed then
session.log("warn", "Failed to receive a stream close response, closing connection anyway...");
sm_destroy_session(session, reason_text);
- if conn then conn:close(); end
+ if conn then
+ conn:close();
+ end
end
end);
else
sm_destroy_session(session, reason_text);
- if conn then conn:close(); end
+ if conn then
+ conn:close();
+ end
end
else
local reason_text = (reason and (reason.name or reason.text or reason.condition)) or reason;