From d4a7b41d709fcd51ffe203fccfffff130442cad1 Mon Sep 17 00:00:00 2001 From: 0880 <98263509+0880880@users.noreply.github.com> Date: Wed, 21 Jan 2026 14:01:23 +0330 Subject: [PATCH] Allow leaving queue to not break other user's games --- app.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 93db83a..fdf6120 100644 --- a/app.py +++ b/app.py @@ -289,7 +289,14 @@ async def quick_match(request: Request): return JSONResponse({"room_id": quick_map[qid]}) else: return JSONResponse({}) # Client handles empty as continue to wait - + elif ( + data + and len(data) == 2 + and "queue_id" in data + and data["queue_id"] in quick_queue + and "leave" in data + ): + quick_queue.remove(data["queue_id"]) else: qid = str(uuid.uuid4()) quick_queue.append(qid)