mirror of
https://github.com/bjc/prosody.git
synced 2025-04-01 20:27:39 +03:00
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:
parent
5b1d83614b
commit
5b4624137d
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue