Bail out from update methods in MasternodeList when shutdown is requested (#2551)

This commit is contained in:
Alexander Block 2018-12-13 07:55:42 +01:00 committed by GitHub
parent 1522656d6f
commit 09730e1c59
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -274,6 +274,10 @@ void MasternodeList::updateMyMasternodeInfo(QString strAlias, QString strAddr, c
void MasternodeList::updateMyNodeList(bool fForce)
{
if (ShutdownRequested()) {
return;
}
TRY_LOCK(cs_mymnlist, fLockAcquired);
if (!fLockAcquired) return;
@ -310,6 +314,10 @@ void MasternodeList::updateMyNodeList(bool fForce)
void MasternodeList::updateNodeList()
{
if (ShutdownRequested()) {
return;
}
TRY_LOCK(cs_mnlist, fLockAcquired);
if (!fLockAcquired) return;
@ -380,6 +388,10 @@ void MasternodeList::updateNodeList()
void MasternodeList::updateDIP3List()
{
if (ShutdownRequested()) {
return;
}
TRY_LOCK(cs_dip3list, fLockAcquired);
if (!fLockAcquired) return;