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

Push: late-initialised clientId not updated in LocalDevice #481

Closed
paddybyers opened this issue Jun 25, 2019 · 2 comments
Closed

Push: late-initialised clientId not updated in LocalDevice #481

paddybyers opened this issue Jun 25, 2019 · 2 comments
Assignees

Comments

@paddybyers
Copy link
Member

paddybyers commented Jun 25, 2019

It is possible to initialise the client library in a way that means the clientId is not known in the constructor; instead, it only becomes known when either an authURL/authCallback supplies a TokenDetails that indicates the clientId or at a later time after connection (via the clientId returned in the ConnectionDetails).

This means that it is possible that push activation occurs before the clientId is known, and the local device registration therefore does not include the clientId.

It looks like there are two issues:

  1. https://docs.ably.io/client-lib-development-guide/features/#RSA7b2 is not implemented: this means that late initialisation of a clientId is deferred until a connection is established, whereas it should be set if auth details - TokenDetails or TokenRequest - contain a clientId;

  2. in Auth.setClientId(), any LocalDevice does not have its clientId updated, and there is no subsequent registration update.

@paddybyers paddybyers changed the title Push: possible race-condition in initialisation sequence Push: late-initialised clientId not updated in LocalDevice Jun 26, 2019
@paddybyers
Copy link
Member Author

So (1) above is not an issue - this functionality exists and is tested.

@paddybyers
Copy link
Member Author

Fixed by #485

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