client.disconnect fails with "undefined method 'close' for nil:NilClass" #66

Closed
eliaslevy opened this Issue May 5, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@eliaslevy
Contributor

eliaslevy commented May 5, 2011

EM.run do
client = AMQP.connect(:host => '127.0.0.1')
client.disconnect
end

NoMethodError: undefined method close' for nil:NilClass from /home/aleph1/janus.immunet.com/trunk/ruby/lib/ruby/gems/1.9.1/gems/amq-client-0.7.0.alpha13/lib/amq/client/adapter.rb:213:indisconnect'

@michaelklishin

This comment has been minimized.

Show comment Hide comment
@michaelklishin

michaelklishin May 5, 2011

Member

This code is a subject to race conditions. By the moment you are trying to disconnect, connection isn't open yet.

Member

michaelklishin commented May 5, 2011

This code is a subject to race conditions. By the moment you are trying to disconnect, connection isn't open yet.

michaelklishin added a commit to ruby-amqp/amq-client that referenced this issue May 5, 2011

michaelklishin added a commit that referenced this issue May 5, 2011

@michaelklishin

This comment has been minimized.

Show comment Hide comment
@michaelklishin

michaelklishin May 5, 2011

Member

amqp 0.8.0.rc6 and amq-client 0.7.0.alpha18 are now both available from rubygems.org. Thank you for reporting.

Member

michaelklishin commented May 5, 2011

amqp 0.8.0.rc6 and amq-client 0.7.0.alpha18 are now both available from rubygems.org. Thank you for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment