Match-maker: RoomListingData returns wrong number of clients after client reconnect
See original GitHub issueAfter implementing client reconnect, I noticed that the connections count in the Colyseus monitor is wrong after a client successfully reconnected to a room. For each successful reconnect, the connection count is decremented by one. Reconnecting multiple times can result in negative connection counts. Inspecting the room yields the correct connection count.
Digging through the code showed me that the endpoint simply displays the match-maker query. So I suspect a bug in the match.-maker itself.
Steps to Reproduce
- Connect to a room and go to the Colyseus Monitor: “1 Connection”
- Client loses connection and successfully reconnects using
client.reconnect()
- Go to Colyseus Monitor again: “0 Connections” but the room still exists
- Click on the room: “1 Connection” (which is correct)
Context
Trying to implement client reconnect with the standard procedure as stated in the docs.
Your Environment
- Colyseus Version: 0.14.20
- Colyseus.js Version: 0.14.13
- Colyseus Monitor Version: 0.14.20
- Node.js Version: 14.15.3
- Operating System and version: Linux Mint 20.2 (Kernel 5.8.0)
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Room - Colyseus & Arena Cloud Documentation
If onAuth() returns a falsy value, the client is immediatelly rejected, causing the matchmaking function call from the client-side to fail.
Read more >Issues · colyseus/colyseus · GitHub
Server does not sync state with clients on the latest version ... Match-maker: RoomListingData returns wrong number of clients after client reconnect bug....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@lpsandaruwan Interesting. We do it like in your first example. That explains it.
Thanks for looking into this @lpsandaruwan
Maybe this behaviour happens on the same scenario as https://github.com/colyseus/colyseus/issues/348#issuecomment-913933140