Changeset

13764:667a58e74fd9 13.0

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.
author Matthew Wild <mwild1@gmail.com>
date Tue, 11 Mar 2025 18:37:16 +0000
parents 13763:11b51779d546
children 13765:7c57fb2ffbb0
files plugins/mod_c2s.lua
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;