Force checkqueue to quit while shutting down.
authorCryptoManiac <balthazar@yandex.ru>
Wed, 16 Sep 2015 18:46:35 +0000 (21:46 +0300)
committerCryptoManiac <balthazar@yandex.ru>
Wed, 16 Sep 2015 18:46:35 +0000 (21:46 +0300)
src/checkqueue.h

index 3c30db7..c4c35e5 100644 (file)
@@ -13,6 +13,8 @@
 #include <boost/thread/locks.hpp>
 #include <boost/thread/mutex.hpp>
 
+extern bool fShutdown;
+
 template<typename T> class CCheckQueueControl;
 
 /** Queue for verifications that have to be performed.
@@ -121,7 +123,8 @@ private:
                 if (fOk)
                     fOk = check();
             vChecks.clear();
-        } while(true);
+        } while(true && !fShutdown); // HACK: force queue to shut down
+        return false;
     }
 
 public: