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

Fix #465 #466

Merged
merged 2 commits into from Mar 2, 2017
Merged

Fix #465 #466

merged 2 commits into from Mar 2, 2017

Conversation

madAle
Copy link
Contributor

@madAle madAle commented Mar 2, 2017

I provided some specs related to #465 and also suggested a fix that I hope correctly addresses the issue.

end

describe '#start' do
it 'should be possible to reopen it' do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't plan on supporting this but if we do and it's actually a safe thing to do in practice, no objections from me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, given that I'll remove the recommendation given in current ConnectionManuallyClosed exception (name will change), I'll also drop these specs in order to maintain things coherent and not add official support for connection reopen. @michaelklishin do you agree?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@michaelklishin michaelklishin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. This is very close to what I had in mind. Let's address the two small comments in this review and I'll merge.

Also, please base your branch on 2.6.x-stable so that we can ship it sooner.

@@ -97,6 +97,12 @@ def initialize(frame)
end
end

class ConnectionManuallyClosed < Exception
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other clients use AlreadyClosedException (Java) and similar names. I'd prefer that.

@@ -97,6 +97,12 @@ def initialize(frame)
end
end

class ConnectionManuallyClosed < Exception
def initialize
super('Connection has been manually closed. Call #start to reopen it')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how I feel about recommending this. It may or may not be safe and I don't think we should support reopening at all. It is hard and is not meaningfully easier to use than opening a new connection.
So let's drop the recommendation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree.

…ection reopen after it has been manually closed

Change ConnectionManuallyClosed exception name to ConnectionAlreadyClosed
Minor improvements
@michaelklishin michaelklishin changed the base branch from master to 2.6.x-stable March 2, 2017 19:03
@michaelklishin michaelklishin changed the base branch from 2.6.x-stable to master March 2, 2017 19:03
@michaelklishin michaelklishin merged commit 19811b7 into ruby-amqp:master Mar 2, 2017
@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.

None yet

2 participants