We require a way to cleanup the socket state of game rooms. I a connected user joins game A and then leaves game A to join game B, the game engine will continue to broadcast messages from game A to the client.
Implementation
The client now sends a leave game message, so we tap into that to remove the requesting channel from the game-room. We also added a cleaning task to the scheduler that will remove connections that may not have had the chance to send that message.
Feature
We require a way to cleanup the socket state of game rooms. I a connected user joins game A and then leaves game A to join game B, the game engine will continue to broadcast messages from game A to the client.
Implementation
The client now sends a leave game message, so we tap into that to remove the requesting channel from the game-room. We also added a cleaning task to the scheduler that will remove connections that may not have had the chance to send that message.