octachrome / treason

A clone of the card game Coup written in Node.js
Other
139 stars 79 forks source link

Clear dead games #44

Closed JackieNiebling closed 4 years ago

JackieNiebling commented 4 years ago

When a player creates a game, that game sticks around until the player joins. If the player fails to join (socket timeout, browser/script abort due to multiple submissions or name validation check, etc), the game remains active. If the creator also password protected the game, then no other player can join the game to 'revive' it and it sticks around forever. This is why we only saw dead games with passwords - the ones without would have been revived and garbage collected by other players joining and leaving them.

octachrome commented 4 years ago

It's a good fix, thanks.