ruby-amqp/march_hare

Session#disable_automatic_recovery broken due to typo

ivoanjo opened this issue · 2 comments

There is a typo in https://github.com/ruby-amqp/march_hare/blob/master/lib/march_hare/session.rb#L241 where there is a missing c from the variable, thus if you try to use it:

connection = MarchHare.connect(...)
connection.disable_automatic_recovery
/home/knuckles/.rvm/gems/jruby-9.1.5.0/gems/march_hare-2.18.0-java/lib/march_hare/session.rb:242: warning: instance variable @connetion not initialized
NoMethodError: undefined method `remove_shutdown_listener' for nil:NilClass
from /home/knuckles/.rvm/gems/jruby-9.1.5.0/gems/march_hare-2.18.0-java/lib/march_hare/session.rb:242:in `disable_automatic_recovery'

That method is not a part of the public API, as a YARD tag indicates but thanks for spotting.

Indeed, I just noticed it while I was reading through the source :)
Thanks for the quick fix.