Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition in websocket unsubscribe/resubscribe (#2855)
- If the app tries to start a new websocket subscription before the last one was properly unsubscribed, the app will return a flow that is null and crash. To prevent this, change the unsubscribe logic to immediately remove the subscription ID - the confirmation isn't used. This will allow the app to start a new subscription and create a new flow even if the previous unsubscribe hasn't yet fully finished (which is OK).
- Loading branch information