# HG changeset patch # User Matthew Wild # Date 1741718236 0 # Node ID 667a58e74fd9cdfe4f7a7abf97cef525ec3753eb # Parent 11b51779d546ed9bba4bee4bf8f9caebe3fc5583 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. diff -r 11b51779d546 -r 667a58e74fd9 plugins/mod_c2s.lua --- a/plugins/mod_c2s.lua Tue Mar 11 18:27:54 2025 +0000 +++ b/plugins/mod_c2s.lua Tue Mar 11 18:37:16 2025 +0000 @@ -252,12 +252,16 @@ 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;