From 2dbd179656d4ff0cff0dc7db4ee8dba4ef8ac2b9 Mon Sep 17 00:00:00 2001 From: Kaveh Vahedipour Date: Fri, 21 Apr 2017 11:10:53 +0200 Subject: [PATCH] Fix ocasionally hangling shut down on mac --- arangod/Cluster/HeartbeatThread.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arangod/Cluster/HeartbeatThread.cpp b/arangod/Cluster/HeartbeatThread.cpp index 9bed1d93f5..af42ac8bc1 100644 --- a/arangod/Cluster/HeartbeatThread.cpp +++ b/arangod/Cluster/HeartbeatThread.cpp @@ -825,7 +825,10 @@ void HeartbeatThread::syncDBServerStatusQuo() { _backgroundJobScheduledOrRunning = true; // the JobGuard is in the operator() of HeartbeatBackgroundJob - _ioService->post(HeartbeatBackgroundJob(shared_from_this(), TRI_microtime())); + if (!isStopping() && !_ioService->stopped()) { + _ioService-> + post(HeartbeatBackgroundJob(shared_from_this(), TRI_microtime())); + } } ////////////////////////////////////////////////////////////////////////////////