25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Log errors that happen when retrieving http headers in ejabberd_http

It seems that ssl errors can be generated here, so lets have abily to show
them instead of swallowing them silently.
This commit is contained in:
Paweł Chmielowski 2020-04-07 13:49:50 +02:00
parent e01e528235
commit 16585713f8

View File

@ -193,7 +193,10 @@ receive_headers(#state{trail = Trail} = State) ->
Socket = State#state.socket, Socket = State#state.socket,
Data = SockMod:recv(Socket, 0, 300000), Data = SockMod:recv(Socket, 0, 300000),
case Data of case Data of
{error, _} -> ok; {error, Error} ->
?DEBUG("Error when retrieving http headers ~p: ~p",
[State#state.sockmod, Error]),
ok;
{ok, D} -> {ok, D} ->
parse_headers(State#state{trail = <<Trail/binary, D/binary>>}) parse_headers(State#state{trail = <<Trail/binary, D/binary>>})
end. end.