fix: crash that could occur when force-closing 7tv/bttv live updates (#6197)

This commit is contained in:
pajlada
2025-05-10 14:22:19 +02:00
committed by GitHub
parent dec42b38a6
commit aa7630af71
2 changed files with 9 additions and 8 deletions
@@ -402,23 +402,23 @@ private:
return false;
}
std::vector<Subscription> pendingSubscriptions_;
std::atomic<bool> addingClient_{false};
ExponentialBackoff<5> connectBackoff_{std::chrono::milliseconds(1000)};
liveupdates::WebsocketClient websocketClient_;
std::unique_ptr<std::thread> mainThread_;
OnceFlag stoppedFlag_;
std::map<liveupdates::WebsocketHandle,
std::shared_ptr<BasicPubSubClient<Subscription>>,
std::owner_less<liveupdates::WebsocketHandle>>
clients_;
std::vector<Subscription> pendingSubscriptions_;
std::atomic<bool> addingClient_{false};
ExponentialBackoff<5> connectBackoff_{std::chrono::milliseconds(1000)};
std::shared_ptr<boost::asio::executor_work_guard<
boost::asio::io_context::executor_type>>
work_{nullptr};
liveupdates::WebsocketClient websocketClient_;
std::unique_ptr<std::thread> mainThread_;
OnceFlag stoppedFlag_;
const QString host_;
/// Short name of the service (e.g. "7TV" or "BTTV")