mirror of
https://github.com/processone/ejabberd
synced 2025-10-03 09:49:18 +02:00
Use ejabberd_sql:abort/1 instead of exit/1
This commit is contained in:
parent
178a0a3e1b
commit
5087e9c2df
1 changed files with 4 additions and 4 deletions
|
@ -105,16 +105,16 @@ activate_stream(SID, IJID, MaxConnections, _Node) ->
|
||||||
?SQL("select @(count(*))d from proxy65 "
|
?SQL("select @(count(*))d from proxy65 "
|
||||||
"where jid_i=%(IJID)s")) of
|
"where jid_i=%(IJID)s")) of
|
||||||
{selected, [{Num}]} when Num > MaxConnections ->
|
{selected, [{Num}]} when Num > MaxConnections ->
|
||||||
exit({limit, IPid, TPid});
|
ejabberd_sql:abort({limit, IPid, TPid});
|
||||||
{selected, _} ->
|
{selected, _} ->
|
||||||
{ok, IPid, TPid};
|
{ok, IPid, TPid};
|
||||||
Err ->
|
Err ->
|
||||||
exit(Err)
|
ejabberd_sql:abort(Err)
|
||||||
end;
|
end;
|
||||||
{updated, _} ->
|
{updated, _} ->
|
||||||
{ok, IPid, TPid};
|
{ok, IPid, TPid};
|
||||||
Err ->
|
Err ->
|
||||||
exit(Err)
|
ejabberd_sql:abort(Err)
|
||||||
end
|
end
|
||||||
catch _:{bad_node, _} ->
|
catch _:{bad_node, _} ->
|
||||||
{error, notfound}
|
{error, notfound}
|
||||||
|
@ -124,7 +124,7 @@ activate_stream(SID, IJID, MaxConnections, _Node) ->
|
||||||
{selected, _} ->
|
{selected, _} ->
|
||||||
{error, notfound};
|
{error, notfound};
|
||||||
Err ->
|
Err ->
|
||||||
exit(Err)
|
ejabberd_sql:abort(Err)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
case ejabberd_sql:sql_transaction(?MYNAME, F) of
|
case ejabberd_sql:sql_transaction(?MYNAME, F) of
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue