Use default vhost - so if someone specifies a URL like amqp://localhost it will work for federated exchanges in all vhosts.

This commit is contained in:
Simon MacMullen 2012-04-24 11:34:16 +01:00
parent ad21849e8d
commit dbcf8b26a8
1 changed files with 2 additions and 2 deletions

View File

@ -85,9 +85,9 @@ from_props(Upst, DefaultXNameBin, DefaultVHost) ->
Upst, ConnName, Conn, DefaultXNameBin, DefaultVHost)
end.
from_props_connection(U, ConnName, C, DefaultXNameBin, _DefaultVHost) ->
from_props_connection(U, ConnName, C, DefaultXNameBin, DefaultVHost) ->
URI = bget(uri, U, C),
{ok, Params} = amqp_uri:parse(binary_to_list(URI)),
{ok, Params} = amqp_uri:parse(binary_to_list(URI), DefaultVHost),
#upstream{params = Params,
exchange = bget(exchange, U, C, DefaultXNameBin),
prefetch_count = bget(prefetch_count, U, C, none),