Skip to content

Conversation

@myandrienko
Copy link
Contributor

@myandrienko myandrienko commented Nov 21, 2024

this.disconnectionPromise.finally(
() => (this.disconnectionPromise = undefined),
await withoutConcurrency(this.connectionConcurrencyTag, () =>
disconnectUser(),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had a lot of this disconnectionPromise/connectionPromise chaining to make sure the two don't run at the same time. Replacing with withoutConcurrency for simplicity. Also allows us to get rid of two stored promises.

@myandrienko myandrienko force-pushed the reconnect-handle-errors branch from 67f895a to f852c78 Compare November 21, 2024 14:48
@myandrienko myandrienko marked this pull request as ready for review November 21, 2024 17:18
@myandrienko myandrienko merged commit 920c4ea into main Nov 22, 2024
14 checks passed
@myandrienko myandrienko deleted the reconnect-handle-errors branch November 22, 2024 12:28
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

Successfully merging this pull request may close these issues.

3 participants