From 87b222c79e491291bb2743d11817b58f36396dc2 Mon Sep 17 00:00:00 2001 From: lizzie Date: Sun, 14 Jun 2026 22:37:39 -0400 Subject: [PATCH] zf --- src/web_service/announce_room_json.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/web_service/announce_room_json.cpp b/src/web_service/announce_room_json.cpp index 7e80d22580..c3a44257ef 100644 --- a/src/web_service/announce_room_json.cpp +++ b/src/web_service/announce_room_json.cpp @@ -138,9 +138,10 @@ void RoomJson::Delete() { } else { // This jthread won't be destroyed until after the dtor has been ran // Once the thread finishes it will stay resident on the vector -- destroyed and freed by dtor() - detached_tasks.emplace_back([](std::stop_token stop_token, RoomJson& this_) { - this_.client.DeleteJson(fmt::format("/lobby/{}", this_.room_id), "", false); - }, *this); + // this is still valid while in dtor, so... yeah + detached_tasks.emplace_back([this](std::stop_token stop_token) { + client.DeleteJson(fmt::format("/lobby/{}", room_id), "", false); + }); } }