mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
* src/ejabberd_router.erl (do_route/3): Slightly changed behaviour
SVN Revision: 195
This commit is contained in:
parent
7e6d96b192
commit
5d7f5c3a79
@ -1,3 +1,7 @@
|
||||
2004-01-03 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/ejabberd_router.erl (do_route/3): Slightly changed behaviour
|
||||
|
||||
2004-01-01 Alexey Shchepin <alexey@sevcom.net>
|
||||
|
||||
* src/ejabberd_sm.erl (do_route/3): Minor fix
|
||||
|
@ -80,7 +80,11 @@ do_route(From, To, Packet) ->
|
||||
?DEBUG("routed to process ~p~n", [Pid]),
|
||||
Pid ! {route, From, To, Packet};
|
||||
Rs ->
|
||||
R = lists:nth(erlang:phash(now(), length(Rs)), Rs),
|
||||
Rs1 = case [R || R <- Rs, node(R#route.pid) == node()] of
|
||||
[] -> Rs;
|
||||
LRs -> LRs
|
||||
end,
|
||||
R = lists:nth(erlang:phash(now(), length(Rs1)), Rs1),
|
||||
Pid = R#route.pid,
|
||||
?DEBUG("routed to process ~p~n", [Pid]),
|
||||
Pid ! {route, From, To, Packet}
|
||||
|
Loading…
Reference in New Issue
Block a user