24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-10 21:47:01 +02: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, end,
TRes = mnesia:transaction(F), TRes = mnesia:transaction(F),
case TRes of case TRes of
{atomic, Pid} -> {atomic, Pid1} ->
ejabberd_s2s_out:connect(Pid), if Pid1 == Pid ->
[Pid]; ejabberd_s2s_out:connect(Pid);
true ->
ejabberd_s2s_out:stop(Pid)
end,
[Pid1];
{aborted, Reason} -> {aborted, Reason} ->
?ERROR_MSG("failed to register connection ~s -> ~s: ~p", ?ERROR_MSG("failed to register connection ~s -> ~s: ~p",
[MyServer, Server, Reason]), [MyServer, Server, Reason]),