From a073761e31842ea2ed1f972f1820adee9cff8cd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Sat, 23 Jul 2016 23:41:06 +0000 Subject: [PATCH] Improved restart --- lib/MySQL_Monitor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/MySQL_Monitor.cpp b/lib/MySQL_Monitor.cpp index 5923ee689..705a816be 100644 --- a/lib/MySQL_Monitor.cpp +++ b/lib/MySQL_Monitor.cpp @@ -58,6 +58,10 @@ class ConsumerThread : public Thread { for (int i = 0; ( thrn ? i < thrn : 1) ; i++) { WorkItem* item = (WorkItem*)m_queue.remove(); if (item==NULL) { + if (thrn) { + // we took a NULL item that wasn't meant to reach here! Add it again + GloMyMon->queue.add(NULL); + } // this is intentional to EXIT immediately return NULL; }