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

WebSocket connection lost when recover with cached token #39

Closed
ruleechen opened this issue Jan 25, 2022 · 1 comment
Closed

WebSocket connection lost when recover with cached token #39

ruleechen opened this issue Jan 25, 2022 · 1 comment

Comments

@ruleechen
Copy link
Contributor

The feature of recover from cached token works well for single page. When we open two or more pages, each page try to recover from the cached token. The pages will try to launch their own websocket connection.

Then it comes to this issue:

Each page will call the below api, but calling this api will disconnect other pages worksocket connection as my test.

const r = await this.rc.post('/restapi/oauth/wstoken');

@tylerlong
Copy link
Contributor

The root cause is: one wsToken can only establish one connection. If multiple tabs/pages share the same cached wsToken, existing connections will be disconnected upon new connections created.

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

No branches or pull requests

2 participants