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.
This commit is contained in:
Matthew Wild 2025-03-11 18:37:16 +00:00
parent 5b1d83614b
commit 5b4624137d

View file

@ -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;