-
Notifications
You must be signed in to change notification settings - Fork 26
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
RTN15f #438
Conversation
var resumed = false | ||
waitUntil(timeout: testTimeout) { done in | ||
client.connection.once(.Connected) { _ in | ||
channel.publish(nil, data: "message") { _ in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure I follow hot his method is called twice, can you explain?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is called twice? Can you clarify? The publish
only receives the ACK
(callback is called) after the connection has been resumed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I'm wrong. @tcard do you have any suggestion for this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand @mattheworiordan 's point either. This looks good to me. The message is sent in one transport, which is immediately dropped. The fact that publish's callback is called after the connection is resumed proves that the library resent the message in the new transport.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I misunderstood the code. However, as the spec states that the message is resent on the new transport, can we also include that check so that this test code explains what is happening i.e. it's not that on a new connection the ACK is sent, it's actually an ACK that is received from the message being resent. Do you agree?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done bcd8a7e.
LGTM (by the way). |
No description provided.