Bail out from update methods in MasternodeList when shutdown is requested (#2551)
This commit is contained in:
parent
1522656d6f
commit
09730e1c59
@ -274,6 +274,10 @@ void MasternodeList::updateMyMasternodeInfo(QString strAlias, QString strAddr, c
|
|||||||
|
|
||||||
void MasternodeList::updateMyNodeList(bool fForce)
|
void MasternodeList::updateMyNodeList(bool fForce)
|
||||||
{
|
{
|
||||||
|
if (ShutdownRequested()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TRY_LOCK(cs_mymnlist, fLockAcquired);
|
TRY_LOCK(cs_mymnlist, fLockAcquired);
|
||||||
if (!fLockAcquired) return;
|
if (!fLockAcquired) return;
|
||||||
|
|
||||||
@ -310,6 +314,10 @@ void MasternodeList::updateMyNodeList(bool fForce)
|
|||||||
|
|
||||||
void MasternodeList::updateNodeList()
|
void MasternodeList::updateNodeList()
|
||||||
{
|
{
|
||||||
|
if (ShutdownRequested()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TRY_LOCK(cs_mnlist, fLockAcquired);
|
TRY_LOCK(cs_mnlist, fLockAcquired);
|
||||||
if (!fLockAcquired) return;
|
if (!fLockAcquired) return;
|
||||||
|
|
||||||
@ -380,6 +388,10 @@ void MasternodeList::updateNodeList()
|
|||||||
|
|
||||||
void MasternodeList::updateDIP3List()
|
void MasternodeList::updateDIP3List()
|
||||||
{
|
{
|
||||||
|
if (ShutdownRequested()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
TRY_LOCK(cs_dip3list, fLockAcquired);
|
TRY_LOCK(cs_dip3list, fLockAcquired);
|
||||||
if (!fLockAcquired) return;
|
if (!fLockAcquired) return;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user