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 Channel.subscribe onAttachCallback #844

Merged
merged 5 commits into from
Apr 24, 2019

Conversation

ricardopereira
Copy link
Contributor

Case: Push test was failing because lib was returning an error with 204 status code which shouldn't.
Swift Regression https://bugs.swift.org/browse/SR-2429

That's why sometimes some tests were failing because the server responded differently: X-Ably-Errorcode or X-Ably-errorcode, etc.
The solution: "do not try and recover a connection from a client library instance that is still present and active."

Discussion: "the connection that you connected with at first is disconnected on line ~558 with 'transport superseded', because the second, new connection that you started recovered that connection.
But that first connection doesn't know that! All it knows is that it got a 'disconnected', and it should then try to connect again.
So it then tries that -- and steals the connection back from the second. (this time getting a 'Connection superseded' for the reason I said above, because it had an old handle).
So you have these two library instances fighting over the same connection, trading it back and forth."
@ricardopereira
Copy link
Contributor Author

Had to cherry pick f3933f7, e9e5c22, 068b0ae and b2165d2

Copy link
Member

@mattheworiordan mattheworiordan left a comment

Choose a reason for hiding this comment

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

Hard to comment as I don't understand the internals of the Obj-C lib sufficently, but otherwise LGTM

@ricardopereira ricardopereira merged commit d71ab76 into develop Apr 24, 2019
@ricardopereira ricardopereira deleted the fix-subscribe-onAttachCallback branch April 24, 2019 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants