From a59301712ee105a747733c3f7c842e084211e8a3 Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Tue, 23 May 2023 02:22:16 +0300 Subject: [PATCH] Avoid race condition when waking worker thread PR #19005. --- src/base/bittorrent/dbresumedatastorage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/bittorrent/dbresumedatastorage.cpp b/src/base/bittorrent/dbresumedatastorage.cpp index 7611993a9..7738d6b9b 100644 --- a/src/base/bittorrent/dbresumedatastorage.cpp +++ b/src/base/bittorrent/dbresumedatastorage.cpp @@ -703,8 +703,8 @@ void BitTorrent::DBResumeDataStorage::Worker::run() void DBResumeDataStorage::Worker::requestInterruption() { - m_waitCondition.wakeAll(); QThread::requestInterruption(); + m_waitCondition.wakeAll(); } void BitTorrent::DBResumeDataStorage::Worker::store(const TorrentID &id, const LoadTorrentParams &resumeData)