Diff

plugins/mod_c2s.lua @ 8819:780d728f969f

mod_c2s: Avoid concatenating potential nil value (fixes #753)
author Kim Alvefur <zash@zash.se>
date Tue, 22 May 2018 22:22:57 +0200
parent 8388:9ee56e9ad47a
child 8820:1348a931528a
child 8846:7ec098b68042
line wrap: on
line diff
--- a/plugins/mod_c2s.lua	Wed May 16 23:57:30 2018 +0100
+++ b/plugins/mod_c2s.lua	Tue May 22 22:22:57 2018 +0200
@@ -168,7 +168,7 @@
 		function session.send() return false; end
 
 		local reason_text = (reason and (reason.name or reason.text or reason.condition)) or reason;
-		session.log("debug", "c2s stream for %s closed: %s", session.full_jid or ("<"..session.ip..">"), reason_text or "session closed");
+		session.log("debug", "c2s stream for %s closed: %s", session.full_jid or session.ip or "<unknown>", reason_text or "session closed");
 
 		-- Authenticated incoming stream may still be sending us stanzas, so wait for </stream:stream> from remote
 		local conn = session.conn;