Skip to content

Conversation

scotu
Copy link

@scotu scotu commented Jan 5, 2016

Just a trivial fix for Socket.IO v1, I encountered the bug using maxClients in the config. I wasn't sure if it's good to return 0 if the room is not valid (because I'm not sure how it can happen that is not valid).

Let me know if I need to adjust anything.

(Thanks for signalmaster, btw :D)

sockets.js Outdated
Copy link

Choose a reason for hiding this comment

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

This doesn't work for me:
room.length is always undefined.
You should use Object.keys(room).length instead of room.length

Otherwise clientsInRooms is always 0;

@scotu
Copy link
Author

scotu commented Jan 9, 2016

My "fix" was indeed wrong. I updated the pr, I also noticed that to get the room, in other functions in signalmaster, the namespace was selected manually, so I went that way also here.

Let me know any further problems or requirements

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.

3 participants