Closed Woody4618 closed 11 months ago
Describe the bug 1) When subscribing to accounts before the websocket connection is established the subscribtions get lost without an error message:
2) When subscribing to the account on multiple channels none of the subscriptions trigger anymore.
3) When Socket connection looses connection, when running for a while in a webgl build for example, there is no automatic reconnect.
4) 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.
Thanks for opening the PR. Done some initial work in #186.
Describe the bug 1) When subscribing to accounts before the websocket connection is established the subscribtions get lost without an error message:
2) When subscribing to the account on multiple channels none of the subscriptions trigger anymore.
3) When Socket connection looses connection, when running for a while in a webgl build for example, there is no automatic reconnect.
4) 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.