aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-02-08 08:50:47 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-02-08 08:51:19 +0100
commit36a927c52585b9c263811799f76f5a164a909b9d (patch)
tree9373e6372f8772dc47ab504b23efa3aa12c5b051 /src/qt/bitcoin.cpp
parent7217ea2cc8dd17784a95574724e76303ac2e2823 (diff)
parent2222bf02c94a10387c318b295982719eb07b8d06 (diff)
downloadbitcoin-36a927c52585b9c263811799f76f5a164a909b9d.tar.xz
Merge #12377: qt: Poll ShutdownTimer after init is done
2222bf0 qt: Poll ShutdownTimer after init is done (MarcoFalke) Pull request description: The shutdown process has started in `requestShutdown`, but initialize will happily continue with `initializeResult` and start threads late in the shutdown progess. Deleting this running thread will crash the application according to the qt docs: https://github.com/qt/qtbase/blob/e5033a5c9b769815112e922d0b224af860afd219/src/corelib/thread/qthread.cpp#L412-L415 Potential fix for https://github.com/bitcoin/bitcoin/issues/12372#issuecomment-363642332 This reverts #11831 for now and hopefully restores the previous behaviour. Tree-SHA512: 8e1706afe90ddf2d972aca12c12d4cb2a9a4f38646c59c5466fe5a1a67361896b93c43917d5ac283841ee2bcc62e6bb8dc2bc81dea9129c899b354e9a4ef241b
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index e567a177f9..8fd857e01f 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -388,7 +388,6 @@ void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
pollShutdownTimer = new QTimer(window);
connect(pollShutdownTimer, SIGNAL(timeout()), window, SLOT(detectShutdown()));
- pollShutdownTimer->start(200);
}
void BitcoinApplication::createSplashScreen(const NetworkStyle *networkStyle)
@@ -515,6 +514,7 @@ void BitcoinApplication::initializeResult(bool success)
window, SLOT(message(QString,QString,unsigned int)));
QTimer::singleShot(100, paymentServer, SLOT(uiReady()));
#endif
+ pollShutdownTimer->start(200);
} else {
quit(); // Exit main loop
}