Skip to content

Fix race condition during reconnect sends UNSUB messages #1321

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ajax-surovskyi-y
Copy link
Contributor

This is a PR for #1320

Race condition during reconnect sends unsent UNSUB messages before CONNECT, triggering Authorization Violation errors

@scottf
Copy link
Contributor

scottf commented Jun 9, 2025

@ajax-surovskyi-y I'm inclined to accept this portion:

this.serverAuthErrors.clear(); // reset on successful connection

but not the other change.

I think what we need to do is figure out how to know that we are trying to transmit between disconnect and connect. Maybe a second check?

What would be useful is some repeatable test to be able to test this. If we have to use some sort of mock or simulation, that would be extremely helpful.

@ajax-surovskyi-y
Copy link
Contributor Author

@scottf Thanks! I've updated the PR to include only the

this.serverAuthErrors.clear();

change.

I'll also try to come up with a repeatable test to reproduce the issue reliably.

Will follow up once I have something concrete.

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.

2 participants