mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-20 17:27:00 +01:00
ejabberd_s2s_in: Log message on connection close
Log a message when an incoming s2s connection is closed, analogous to the message on outgoing s2s connection close.
This commit is contained in:
parent
66132353df
commit
8c8c480477
@ -131,7 +131,15 @@ reject_unauthenticated_packet(State, _Pkt) ->
|
|||||||
Err = xmpp:serr_not_authorized(),
|
Err = xmpp:serr_not_authorized(),
|
||||||
send(State, Err).
|
send(State, Err).
|
||||||
|
|
||||||
process_closed(State, _Reason) ->
|
process_closed(#{server := LServer} = State, Reason) ->
|
||||||
|
RServer = case State of
|
||||||
|
#{remote_server := Name} ->
|
||||||
|
Name;
|
||||||
|
#{ip := IP} ->
|
||||||
|
ejabberd_config:may_hide_data(misc:ip_to_list(IP))
|
||||||
|
end,
|
||||||
|
?INFO_MSG("Closing inbound s2s connection ~s -> ~s: ~s",
|
||||||
|
[RServer, LServer, xmpp_stream_out:format_error(Reason)]),
|
||||||
stop(State).
|
stop(State).
|
||||||
|
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user