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

fix: track socket before run middlewares #5158

Closed

Conversation

TXWSLYF
Copy link

@TXWSLYF TXWSLYF commented Aug 7, 2024

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

Current behavior

the socket is not tracked when run the middlewares

New behavior

track socket before run middlewares

Other information (e.g. related issues)

fix: #5139

@@ -322,6 +322,9 @@ export class Namespace<
debug("adding socket to nsp %s", this.name);
const socket = await this._createSocket(client, auth);

// track socket
this.sockets.set(socket.id, socket);
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, I'm not sure about this change, since the sockets map currently contains only sockets that are actually connected (not in the process of connection).

@darrachequesne
Copy link
Member

Superseded by b04fa64. Thanks 👍

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.

Emit to room not work with uWebsocketjs
2 participants