Fix issues with using the RABBITMQ_URL environment variable #403

merged 1 commit into from May 13, 2016


None yet

2 participants

jipe commented May 13, 2016

I experienced some issues when trying to have two Bunny instances at the same time, where one would be instantiated using (with a connection string set in the RABBITMQ_URL environment variable) and the other would be instantiated using Apparently both instances would then use the connection string from the RABBITMQ_URL environment variable.

This PR is a fix to that issue, so when a Bunny is instantiated given a specific connection string (or hash), it will disregard the RABBITMQ_URL environment variable and when Bunny is instantiated without a connection argument, it will default to use value of a look-up of the RABBITMQ_URL environment variable.

@jipe jipe Default to ENV['RABBITMQ_URL'] when no connection argument is given
- and now defaults to ENV['RABBITMQ_URL'] for connection
- now only uses ENV['RABBITMQ_URL'] for connection argument
  when no other argument is given.
@michaelklishin michaelklishin self-assigned this May 13, 2016
@michaelklishin michaelklishin merged commit a41ef1b into ruby-amqp:master May 13, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment