Skip to content

Conversation

@backendsuraj
Copy link
Contributor

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.

darrachequesne pushed a commit that referenced this pull request Dec 22, 2025
When the `retries` option was enabled, an event emitted in the "connect" handler would be sent twice.

Related: #5258
@darrachequesne
Copy link
Member

Merged as d19928e. Sorry for the (very) late merge...

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.

2 participants