lib/vx/lib/consumer/session.rb in vx-lib-consumer-0.3.1 vs lib/vx/lib/consumer/session.rb in vx-lib-consumer-0.3.2

- old
+ new

@@ -57,14 +57,21 @@ @@session_lock.synchronize do unless open? resume - @conn ||= Bunny.new( - nil, # from ENV['RABBITMQ_URL'] + bunny_options = { heartbeat: Consumer.configuration.heartbeat, automatically_recover: false, - logger: Consumer.configuration.logger + } + + if Consumer.configuration.logger + bunny_options.merge!(logger: Consumer.configuration.logger) + end + + @conn ||= Bunny.new( + nil, # from ENV['RABBITMQ_URL'] + bunny_options ) conn.start while conn.connecting? sleep 0.01