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

Drain queue before emitting connect event. #5259

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

backendsuraj
Copy link

The kind of change this PR does introduce

  • a bug fix
  • a new feature
  • an update to the documentation
  • a code change that improves performance
  • other

Fixes: #5258

Current behavior

When the retries option is enabled in the Socket.IO client, the client emits the initial event twice inside the 'connect' handler.

New behavior

The event inside the 'connect' handler should be emitted only once, regardless of whether the retries option is enabled or disabled.

Other information (e.g. related issues)

We can drain the queue before emitting the connect event.

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.

Client emits initial event twice inside 'connect' handler when retries are enabled.
1 participant