ruby-amqp / bunny

Bunny is a popular, easy to use, mature Ruby client for RabbitMQ
Other
1.39k stars 303 forks source link

fix automatically_recover config option #605

Closed AlexNimoy closed 3 years ago

AlexNimoy commented 3 years ago

If option automatically_recover: false and automatic_recovery not set

opts[:automatically_recover] || opts[:automatic_recovery] #=> nil Other cases

false || nil #=> nil
nil || false #=> false

false | nil #=> false
nil | false #=> false

automatically_recover? return nil https://github.com/ruby-amqp/bunny/blob/master/lib/bunny/session.rb#L456

# @return [Boolean] true if this connection has automatic recovery from network failure enabled
def automatically_recover?
  @automatically_recover
end
michaelklishin commented 3 years ago

Thank you!