summaryrefslogtreecommitdiff
path: root/src/gm.erl
diff options
context:
space:
mode:
authorJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2016-06-28 15:56:17 +0200
committerJean-Sébastien Pédron <jean-sebastien@rabbitmq.com>2016-06-28 16:02:00 +0200
commit2735990fcc5907613c053d16ce86686662c39dc3 (patch)
tree2e55a2ef517f83446440882f6eb5eab00365654d /src/gm.erl
parentfa20bbcc482e3bd09678351191ee9a296113b3dc (diff)
downloadrabbitmq-server-git-2735990fcc5907613c053d16ce86686662c39dc3.tar.gz
Use the new `rand_compat` module to transition from `random` to `rand`
References #860. [#122335241]
Diffstat (limited to 'src/gm.erl')
-rw-r--r--src/gm.erl5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gm.erl b/src/gm.erl
index dc47b93a5b..176e14537f 100644
--- a/src/gm.erl
+++ b/src/gm.erl
@@ -536,9 +536,6 @@ forget_group(GroupName) ->
init([GroupName, Module, Args, TxnFun]) ->
put(process_name, {?MODULE, GroupName}),
- _ = random:seed(erlang:phash2([node()]),
- time_compat:monotonic_time(),
- time_compat:unique_integer()),
Self = make_member(GroupName),
gen_server2:cast(self(), join),
{ok, #state { self = Self,
@@ -1069,7 +1066,7 @@ join_group(Self, GroupName, #gm_group { members = Members } = Group, TxnFun) ->
prune_or_create_group(Self, GroupName, TxnFun),
TxnFun);
Alive ->
- Left = lists:nth(random:uniform(length(Alive)), Alive),
+ Left = lists:nth(rand_compat:uniform(length(Alive)), Alive),
Handler =
fun () ->
join_group(