Reasons for onLeave code 1000 (Solved)

I got over 1000 users kicked out of my multiplayer room on my custom server today. I am having trouble sorting out why the users are getting booted out. I have tested and got "randomly" booted out myself. I added logs for the two places I call in my client code room.leave(). Neither of these cases are being hit.

What are the possible reasons for a onLeave callback with a code 1000? The documentation just says "Successful operation / regular socket shutdown", but in this case i am not calling .leave(). The room is also not shutting down - not everyone is getting kicked out.

What are the possible reasons for a code 1000?


Figured it out - there was an error in my server code when a player quits. When an exception occurs in a room i guess it kills the room, kicks all the players out with code 1000! Didn't know about that! Hope someone finds this helpful

Glad you figure it out yourself!