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

[Bug] WebSocket connection does not handle errors well and there is no retry #184

Closed
Woody4618 opened this issue Oct 19, 2023 · 1 comment · Fixed by #186
Closed

[Bug] WebSocket connection does not handle errors well and there is no retry #184

Woody4618 opened this issue Oct 19, 2023 · 1 comment · Fixed by #186
Labels
bug Something isn't working

Comments

@Woody4618
Copy link
Collaborator

Describe the bug

  1. When subscribing to accounts before the websocket connection is established the subscribtions get lost without an error message:
    telegram-cloud-photo-size-2-5298759350338310336-y

telegram-cloud-photo-size-2-5298759350338310352-y

  1. When subscribing to the account on multiple channels none of the subscriptions trigger anymore.

  2. When Socket connection looses connection, when running for a while in a webgl build for example, there is no automatic reconnect.

  3. Socket subscribe functions default to finalized, I would recommend using confirmed commitment.

To Reproduce
Reprouction can be found in this project in the TokenPanel. The subscription only works When waiting a few seconds after the Login happened.
https://github.com/solana-developers/solana-game-starter-kits/blob/main/lumberjack/unity/Lumberjack/Assets/Game/Scripts/Ui/TokenPanel.cs
I added a bunch of comments to the file for easy reproduction.

Expected behavior
I would like an implementation like here:
https://github.com/solana-developers/solana-game-starter-kits/blob/main/seven-seas/unity/Assets/SolPlay/Scripts/Services/SolPlayWebSocketService.cs

Where the subscriptions are saved independant from the socket state and when the sockets connects or reconnects the subscriptions get reapplied.

@Woody4618 Woody4618 added the bug Something isn't working label Oct 19, 2023
@GabrielePicco
Copy link
Collaborator

Thanks for opening the PR. Done some initial work in #186.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants