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

Occasionally getting "Attached timed out" when using [subscribeWithAttachCallback] #649

Closed
liuzhen2008 opened this issue Nov 15, 2017 · 3 comments

Comments

@liuzhen2008
Copy link

liuzhen2008 commented Nov 15, 2017

As the title says,

I sometimes get an error returned saying "attach timed out" with [ARTErrorInfoStatusCode = 0].

So...

  1. When does this occur? It looks random from our perspective

  2. If it happens, what are the consequences in ignoring the error? Anything i need to do to recover form it?

@tcard
Copy link
Contributor

tcard commented Nov 15, 2017

This happens when the client tries to attach to a channel (this is a previous internal step after which the client can publish/subscribe to messages on the channel) but never gets a response back from the server.

This should only happen when transient errors occur, such as networking errors.

The consequence is that the channel won't receive or send any messages. You probably want to call channel.attach then. If the connection has moved to DISCONNECTED due to the networking error, then when CONNECTED again the attach will be retried. (This could happen automatically, really, but it isn't implemented in this library. I'll bring that up.)

@tcard
Copy link
Contributor

tcard commented Nov 15, 2017

Sorry, I just rechecked and what I said used to be right but it isn't anymore. You don't need to reattach manually; the channel will move to the SUSPENDED state, which will trigger a reattach attempt automatically. So in the end the error is just informative.

@liuzhen2008
Copy link
Author

liuzhen2008 commented Nov 15, 2017

@tcard Cool. So I don't need to do anything! for this case

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

No branches or pull requests

2 participants