mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-02 21:17:12 +02:00
Avoid using ! in ejabberd_router and mod_offline
This commit is contained in:
parent
ff6884f313
commit
9f9e308241
|
@ -380,7 +380,7 @@ do_route(Pkt, #route{local_hint = LocalHint,
|
||||||
{apply, Module, Function} when node(Pid) == node() ->
|
{apply, Module, Function} when node(Pid) == node() ->
|
||||||
Module:Function(Pkt);
|
Module:Function(Pkt);
|
||||||
_ ->
|
_ ->
|
||||||
Pid ! {route, Pkt}
|
ejabberd_cluster:send(Pid, {route, Pkt})
|
||||||
end;
|
end;
|
||||||
do_route(_Pkt, _Route) ->
|
do_route(_Pkt, _Route) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
|
@ -380,7 +380,7 @@ handle_offline_items_view(JID, Items) ->
|
||||||
NewEl = set_offline_tag(El, Node),
|
NewEl = set_offline_tag(El, Node),
|
||||||
case ejabberd_sm:get_session_pid(U, S, R) of
|
case ejabberd_sm:get_session_pid(U, S, R) of
|
||||||
Pid when is_pid(Pid) ->
|
Pid when is_pid(Pid) ->
|
||||||
Pid ! {route, NewEl};
|
ejabberd_c2s:route(Pid, {route, NewEl});
|
||||||
none ->
|
none ->
|
||||||
ok
|
ok
|
||||||
end,
|
end,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user