Skip to content
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

Don't recover from network failures in Transport#read_fully #387

Conversation

djmb
Copy link
Contributor

@djmb djmb commented Mar 15, 2016

Fixes #359

When recovering from a network failure, read_fully returns the return value of the call to @session.handle_network_failure(e).

@session.handle_network_failure(e)

In some cases this is a Hash returned from here:

@channels.each do |n, ch|

It makes sense to avoid recovering from network failures inside Transport#read_fully as the recovery code replaces the transport itself. The reader loop can catch the failure and do the recovery for us.

Recovering from network failures replaces the transport, so it is better
to reply on the calling code to do the recovery.
@michaelklishin michaelklishin self-assigned this Mar 15, 2016
@michaelklishin michaelklishin merged commit 01d29cd into ruby-amqp:master Mar 22, 2016
@michaelklishin
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants