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

Not treating BroadcastOptions.except as optional in all cases #467

Closed
Inspiravetion opened this issue Nov 16, 2022 · 1 comment
Closed

Comments

@Inspiravetion
Copy link

I found an old issue that fixed this issue for broadcast() and other scenarios but fetchSockets(), addSockets(), delSockets(), and disconnectSockets() are still using the old pattern so the following code:

const existingSockets = await this.adapter.fetchSockets({
    rooms: new Set([user.id])
})

throws an error like

UnhandledPromiseRejectionWarning: TypeError: opts.except is not iterable
at RedisAdapter.fetchSockets (/app/backend/node_modules/@socket.io/redis-adapter/dist/index.js:609:34)
...
@darrachequesne
Copy link
Member

For future readers: adapter.fetchSockets() is not meant to be used directly, you should use namespace.fetchSockets() instead.

Please reopen if needed.

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

No branches or pull requests

2 participants