Skip to content

socket room empty #4192

Answered by darrachequesne
fish-uncle asked this question in Q&A
Nov 29, 2021 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

socket.rooms is a Set, so it's not serializable (hence your log):

> JSON.stringify(new Set([1, 2, 3]))
'{}'

The second time they enter the room, they can communicate

That sounds weird. Are you able to reproduce with a basic project https://github.com/socketio/socket.io-fiddle?

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@fish-uncle
Comment options

Answer selected by fish-uncle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants