Merge branch 'stable'

This commit is contained in:
Jean-Sébastien Pédron 2016-06-29 16:35:02 +02:00
commit e231203095
2 changed files with 8 additions and 10 deletions

View File

@ -2,11 +2,12 @@
.*.sw?
*.beam
.erlang.mk/
cover/
deps/
doc/
ebin/
logs/
plugins/
/cover/
/deps/
/doc/
/ebin/
/logs/
/plugins/
/xrefr
rabbitmq_federation.d

View File

@ -71,10 +71,7 @@ remove_credentials(URI) ->
list_to_binary(amqp_uri:remove_credentials(binary_to_list(URI))).
to_params(Upstream = #upstream{uris = URIs}, XorQ) ->
random:seed(erlang:phash2([node()]),
erlang:monotonic_time(),
erlang:unique_integer()),
URI = lists:nth(random:uniform(length(URIs)), URIs),
URI = lists:nth(rand_compat: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),