Skip to content

Commit

Permalink
amend 6e4368a to use rand instead of deprecated random
Browse files Browse the repository at this point in the history
  • Loading branch information
hmmr authored May 12, 2021
1 parent 6e4368a commit d94d990
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions priv/templates/nodetool
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ nodename(Name) ->
end.

append_node_suffix(Name, Suffix) ->
random:seed(os:timestamp()),
rand:seed(exsss, os:timestamp()),
case re:split(Name, "@", [{return, list}, unicode]) of
[Node, Host] ->
list_to_atom(lists:concat([Node, Suffix, random:uniform(1000), "@", Host]));
list_to_atom(lists:concat([Node, Suffix, rand:uniform(1000), "@", Host]));
[Node] ->
list_to_atom(lists:concat([Node, Suffix, random:uniform(1000)]))
list_to_atom(lists:concat([Node, Suffix, rand:uniform(1000)]))
end.

%% convert string to erlang term
Expand Down

0 comments on commit d94d990

Please sign in to comment.