-
Notifications
You must be signed in to change notification settings - Fork 25
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
[SDK-3926] Treat all transport errors as recoverable #1823
[SDK-3926] Treat all transport errors as recoverable #1823
Conversation
82d6180
to
e716768
Compare
@paddybyers this is pretty much the PR — I've got to pop out shortly and will add a further test when back to check that an arbitrary error does not provoke a transition to |
Thanks. See ably/specification#171 (comment). So if these changes implement that approach, we're good. |
e716768
to
46ee0b0
Compare
As things stand in this PR:
|
@paddybyers is there more that needs to be done than what I've detailed above? |
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.
Approving with minor comment.
I’m going to need to change this test in an upcoming commit and want the original intent to be clear before I do.
The use of the non-completing authCallback already ensures a timeout.
Want to add a new test with another failure reason.
RTN14d says that a transport error should be considered recoverable if it is > a network failure, a timeout such as RTN14c, or a disconnected > response, other than a token failure RTN14b) However, it does not define what it means by a "network failure", leading to each platform having to provide its own interpretation. In particular, a client recently told us that they’ve been seeing lots of OSStatus 9806 (errSSLClosedAbort) errors. This appears to indicate some sort of failure to perform an SSL handshake. We don’t understand the cause of this issue but we noticed that it was causing the client to transition to the FAILED state. Speaking to Paddy, he said that this error should be provoking a connection retry, not failure. And more broadly, he indicated that, basically, _all_ transport errors should be considered recoverable. So, that’s what we do here. He’s raised a specification issue [1] for us to properly specify this and to decide if there are any nuances to consider, but is keen for us to implement this broad behaviour in ably-cocoa ASAP to help the customer experiencing the errSSLClosedAbort errors. Resolves #1817. [1] ably/specification#171
46ee0b0
to
86b7cc7
Compare
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.
Just one question, but LGTM, thanks
This treats all transport errors as recoverable from the point of view of RTN14d.
The immediate reason for doing this is so that an error of OSStatus 9806 (
errSSLClosedAbort
) doesn't cause the client to transition to theFAILED
state. But, as described in the commit message, this also reflects the broader approach that @paddybyers wants us to take for handling transport errors.Resolves #1817.