25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-07 14:58:56 +02:00

Don't log http errors when socket get closed after processing one request

This commit is contained in:
Paweł Chmielowski 2020-07-28 12:18:18 +02:00
parent 2bcd2c38a9
commit d5935fd1ad

View File

@ -193,6 +193,9 @@ receive_headers(#state{trail = Trail} = State) ->
Socket = State#state.socket,
Data = SockMod:recv(Socket, 0, 300000),
case Data of
{error, closed} when State#state.request_method == undefined ->
% socket closed without receiving anything in it
ok;
{error, Error} ->
?DEBUG("Error when retrieving http headers ~p: ~p",
[State#state.sockmod, Error]),