From 9542cca0dba929089e1ee8783f9717d11afdb9c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Chmielowski?= Date: Wed, 2 Feb 2022 16:26:39 +0100 Subject: [PATCH] One more place where we need to handle socket field not being available --- src/ejabberd_c2s.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ejabberd_c2s.erl b/src/ejabberd_c2s.erl index e378953af..3033501cf 100644 --- a/src/ejabberd_c2s.erl +++ b/src/ejabberd_c2s.erl @@ -305,10 +305,10 @@ process_terminated(#{sid := SID, jid := JID, user := U, server := S, resource := end, bounce_message_queue(SID, JID), State1; -process_terminated(#{socket := Socket, - stop_reason := {tls, _}} = State, Reason) -> +process_terminated(#{stop_reason := {tls, _}} = State, Reason) -> ?WARNING_MSG("(~ts) Failed to secure c2s connection: ~ts", - [xmpp_socket:pp(Socket), format_reason(State, Reason)]), + [case State of #{socket := Socket} -> xmpp_socket:pp(Socket); _ -> <<"unknown">> end, +format_reason(State, Reason)]), State; process_terminated(State, _Reason) -> State.