25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Report more TLS errors

This commit is contained in:
Evgeniy Khramtsov 2017-03-08 08:27:54 +03:00
parent bdc278399d
commit dd11ed82d7
2 changed files with 2 additions and 4 deletions

View File

@ -276,8 +276,7 @@ process_terminated(#{sockmod := SockMod, socket := Socket, jid := JID} = State,
bounce_message_queue(),
State1;
process_terminated(#{sockmod := SockMod, socket := Socket,
stop_reason := {tls, no_certfile}} = State, Reason) ->
%% TODO: we probably need to report more TLS errors here
stop_reason := {tls, _}} = State, Reason) ->
?ERROR_MSG("(~s) Failed to secure c2s connection: ~s",
[SockMod:pp(Socket), format_reason(State, Reason)]),
State;

View File

@ -288,8 +288,7 @@ handle_info(Info, #{server_host := LServer} = State) ->
terminate(Reason, #{auth_domains := AuthDomains,
sockmod := SockMod, socket := Socket} = State) ->
case maps:get(stop_reason, State, undefined) of
{tls, no_certfile} = Err ->
%% TODO: we probably need to report more TLS errors here
{tls, _} = Err ->
?ERROR_MSG("(~s) Failed to secure inbound s2s connection: ~s",
[SockMod:pp(Socket), xmpp_stream_in:format_error(Err)]);
_ ->