From 433b5a46cf2e3bf15fd8b0c5e6e7134807907486 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 21 Nov 2017 18:29:22 +0800 Subject: [PATCH] Fix crash when aborting a torrent creation process. Closes #7783. The wait time wasn't long enough causing the thread to terminate prematurely. Also, to avoid crashing qbt entirely when creating a torrent for a very big file, I decided to wait indefinitely here. --- src/base/bittorrent/torrentcreatorthread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/bittorrent/torrentcreatorthread.cpp b/src/base/bittorrent/torrentcreatorthread.cpp index c8d19c16e..27265da5c 100644 --- a/src/base/bittorrent/torrentcreatorthread.cpp +++ b/src/base/bittorrent/torrentcreatorthread.cpp @@ -67,7 +67,7 @@ TorrentCreatorThread::TorrentCreatorThread(QObject *parent) TorrentCreatorThread::~TorrentCreatorThread() { requestInterruption(); - wait(1000); + wait(); } void TorrentCreatorThread::create(const QString &inputPath, const QString &savePath, const QStringList &trackers,