25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

Avoid using ! in ejabberd_router and mod_offline

This commit is contained in:
Evgeny Khramtsov 2019-07-03 09:42:18 +03:00
parent ff6884f313
commit 9f9e308241
2 changed files with 2 additions and 2 deletions

View File

@ -380,7 +380,7 @@ do_route(Pkt, #route{local_hint = LocalHint,
{apply, Module, Function} when node(Pid) == node() ->
Module:Function(Pkt);
_ ->
Pid ! {route, Pkt}
ejabberd_cluster:send(Pid, {route, Pkt})
end;
do_route(_Pkt, _Route) ->
ok.

View File

@ -380,7 +380,7 @@ handle_offline_items_view(JID, Items) ->
NewEl = set_offline_tag(El, Node),
case ejabberd_sm:get_session_pid(U, S, R) of
Pid when is_pid(Pid) ->
Pid ! {route, NewEl};
ejabberd_c2s:route(Pid, {route, NewEl});
none ->
ok
end,