25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Fix case clause

Fixes #1746
This commit is contained in:
Evgeniy Khramtsov 2017-05-25 13:46:17 +03:00
parent 5802062746
commit 50327a0cfc

View File

@ -480,9 +480,13 @@ new_connection(MyServer, Server, From, FromTo,
end,
TRes = mnesia:transaction(F),
case TRes of
{atomic, Pid} ->
ejabberd_s2s_out:connect(Pid),
[Pid];
{atomic, Pid1} ->
if Pid1 == Pid ->
ejabberd_s2s_out:connect(Pid);
true ->
ejabberd_s2s_out:stop(Pid)
end,
[Pid1];
{aborted, Reason} ->
?ERROR_MSG("failed to register connection ~s -> ~s: ~p",
[MyServer, Server, Reason]),