From 09730e1c59c2b1f79e74f79ed87ff2388bcb0523 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Thu, 13 Dec 2018 07:55:42 +0100 Subject: [PATCH] Bail out from update methods in MasternodeList when shutdown is requested (#2551) --- src/qt/masternodelist.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/qt/masternodelist.cpp b/src/qt/masternodelist.cpp index 06b1d33e627c2..ca76e4c5eb526 100644 --- a/src/qt/masternodelist.cpp +++ b/src/qt/masternodelist.cpp @@ -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;