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

Close accepted socket if sockname/peername has failed

Fixes #1834
This commit is contained in:
Evgeniy Khramtsov 2017-07-06 14:49:21 +03:00
parent a58de70f06
commit a35b9dd9cc

View File

@ -302,7 +302,7 @@ accept(ListenSocket, Module, Opts, Interval) ->
ejabberd_config:may_hide_data(inet_parse:ntoa(PAddr)),
PPort, inet_parse:ntoa(Addr), Port]);
_ ->
ok
gen_tcp:close(Socket)
end,
accept(ListenSocket, Module, Opts, NewInterval);
{error, Reason} ->