Skip to content

When will a match instance be deleted from the server? #901

Answered by delucis
jakehsiao asked this question in Q&A
Discussion options

You must be logged in to vote

Currently the server deletes a match when all players use the leave endpoint, making the room empty:

if (Object.values(metadata.players).some(player => player.name)) {
await db.setMetadata(matchID, metadata);
} else {
// remove room
await db.wipe(matchID);
}

In practice this may not happen reliably if a player closes a client before the leave request. It would probably be nice to add an option for some time-based clean-up now that matches contain updatedAt metadata and an option to disable auto-deletion.

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by delucis
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #881 on February 02, 2021 09:26.