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)