reduce pubsub/liveupdates pubsub clients "wait for clean exit" time from 1s to 100ms (#6019)

This commit is contained in:
pajlada
2025-03-02 17:22:31 +01:00
committed by GitHub
parent 58859d439c
commit 706e65cd1e
3 changed files with 7 additions and 6 deletions
+3 -3
View File
@@ -596,16 +596,16 @@ void PubSub::stop()
// within 1s.
// We could fix the underlying bug, but this is easier & we realistically won't use this exact code
// for super much longer.
if (this->stoppedFlag_.waitFor(std::chrono::seconds{1}))
if (this->stoppedFlag_.waitFor(std::chrono::milliseconds{100}))
{
this->thread->join();
return;
}
qCWarning(chatterinoLiveupdates)
<< "Thread didn't finish within 1 second, force-stop the client";
<< "Thread didn't finish within 100ms, force-stop the client";
this->websocketClient.stop();
if (this->stoppedFlag_.waitFor(std::chrono::milliseconds{100}))
if (this->stoppedFlag_.waitFor(std::chrono::milliseconds{20}))
{
this->thread->join();
return;