fix: datarace in walletmodel.cpp causing occasional segfaults in instantsend code at shutdown (#4583)

Thanks thephez
This commit is contained in:
PastaPastaPasta 2021-11-24 07:06:26 -05:00 committed by GitHub
parent 1aefe95b02
commit 10e5ed2d5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,6 +74,10 @@ void WalletModel::updateStatus()
void WalletModel::pollBalanceChanged()
{
if (node().shutdownRequested()) {
return;
}
// Try to get balances and return early if locks can't be acquired. This
// avoids the GUI from getting stuck on periodical polls if the core is
// holding the locks for a longer time - for example, during a wallet