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

Handle ignore from xmpp_socket callback start

This should help with issue #2244
This commit is contained in:
Paweł Chmielowski 2018-01-24 17:32:09 +01:00
parent 666da60cba
commit 56d4224e08

View File

@ -117,9 +117,13 @@ start(Module, SockMod, Socket, Opts) ->
ok = SockMod:controlling_process(Socket, Pid),
{ok, Pid}
end
catch _:{badmatch, {error, _} = Err} ->
catch
_:{badmatch, {error, _} = Err} ->
SockMod:close(Socket),
Err
Err;
_:{badmatch, ignore} ->
SockMod:close(Socket),
ignore
end.
connect(Addr, Port, Opts) ->