New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create_channel on a connection intentionally closed by the user shown immediately throw an argument/illegal state exception #465

Closed
madAle opened this Issue Mar 2, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@madAle
Contributor

madAle commented Mar 2, 2017

Hi,

I just found this (weird?) behaviour: when creating a channel after a connection.close Bunny tries to recover from a network failure thus failing and getting into a Timeout exception. Is the client supposed to behave in this way? See attached code:

require 'bunny'

client = Bunny.new
client.start

channel = client.create_channel
channel.default_exchange.publish "hello"

client.stop

client.create_channel

# Bunny tries to recover from a network failure

#<Bunny::Session:0x7fd0b8152300 guest@127.0.0.1:5672, vhost=/, addresses=[127.0.0.1:5672]>: Recovering from a network failure...
#<Bunny::Session:0x7fd0b8152300 guest@127.0.0.1:5672, vhost=/, addresses=[127.0.0.1:5672]>: Retrying connection on next host in line: 127.0.0.1:5672

# Timeout::Error (Timeout::Error)

Thanks.

@michaelklishin

This comment has been minimized.

Show comment
Hide comment
@michaelklishin

michaelklishin Mar 2, 2017

Member

Transport write failures trigger a recovery. When a connection is intentionally closed it should throw an exception, much like other clients do.

Member

michaelklishin commented Mar 2, 2017

Transport write failures trigger a recovery. When a connection is intentionally closed it should throw an exception, much like other clients do.

@madAle

This comment has been minimized.

Show comment
Hide comment
@madAle

madAle Mar 2, 2017

Contributor

👍

Contributor

madAle commented Mar 2, 2017

👍

@michaelklishin michaelklishin changed the title from create_channel after connection.close to create_channel on a connection intentionally closed by the user shown immediately throw an argument/illegal state exception Mar 2, 2017

@madAle madAle referenced this issue Mar 2, 2017

Merged

Fix #465 #466

michaelklishin added a commit that referenced this issue Mar 2, 2017

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