Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Use rand directly in master because we require Erlang 18.3
Browse files Browse the repository at this point in the history
References rabbitmq/rabbitmq-server#860.
[#122335241]
  • Loading branch information
dumbbell committed Jun 29, 2016
1 parent 675a98a commit b4e1a30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rabbit_federation_upstream.erl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ remove_credentials(URI) ->
list_to_binary(amqp_uri:remove_credentials(binary_to_list(URI))).

to_params(Upstream = #upstream{uris = URIs}, XorQ) ->
URI = lists:nth(rand_compat:uniform(length(URIs)), URIs),
URI = lists:nth(rand:uniform(length(URIs)), URIs),
{ok, Params} = amqp_uri:parse(binary_to_list(URI), vhost(XorQ)),
XorQ1 = with_name(Upstream, vhost(Params), XorQ),
SafeURI = remove_credentials(URI),
Expand Down

0 comments on commit b4e1a30

Please sign in to comment.