Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/gen_server2.erl
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ adjust_timeout_state(SleptAt, AwokeAt, {backoff, CurrentTO, MinimumTO,
true -> lists:max([MinimumTO, CurrentTO div 2]);
false -> CurrentTO
end,
{Extra, RandomState1} = random:uniform_s(Base, RandomState),
{Extra, RandomState1} = rand:uniform_s(Base, RandomState),
CurrentTO1 = Base + Extra,
{backoff, CurrentTO1, MinimumTO, DesiredHibPeriod, RandomState1}.

Expand Down
14 changes: 7 additions & 7 deletions src/rabbit_misc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ pget_or_die(K, P) ->
V -> V
end.

%% property merge
%% property merge
pmerge(Key, Val, List) ->
case proplists:is_defined(Key, List) of
true -> List;
Expand All @@ -919,9 +919,9 @@ pmerge(Key, Val, List) ->
%% proplists merge
plmerge(P1, P2) ->
dict:to_list(dict:merge(fun(_, V, _) ->
V
end,
dict:from_list(P1),
V
end,
dict:from_list(P1),
dict:from_list(P2))).

pset(Key, Value, List) -> [{Key, Value} | proplists:delete(Key, List)].
Expand Down Expand Up @@ -1166,12 +1166,12 @@ moving_average(Time, HalfLife, Next, Current) ->
random(N) ->
case get(random_seed) of
undefined ->
random:seed(erlang:phash2([node()]),
rand:seed(exsplus, {erlang:phash2([node()]),
time_compat:monotonic_time(),
time_compat:unique_integer());
time_compat:unique_integer()});
_ -> ok
end,
random:uniform(N).
rand:uniform(N).

%% Moved from rabbit/src/rabbit_cli.erl
%% If the server we are talking to has non-standard net_ticktime, and
Expand Down