From 853658e9f1a040fb0a0f262433203d9da92c689f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 29 Aug 2011 15:02:37 -0700 Subject: [PATCH] heartbeatmap: fix reset_timeout with mixed-used threads If you have a ThreadPool used by multiple WorkQueues, and some of them are setting a suicide timeout, we need to clear it when a suicide timeout is not set. Signed-off-by: Sage Weil --- src/common/HeartbeatMap.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/HeartbeatMap.cc b/src/common/HeartbeatMap.cc index a571859f62036..6963ad5bfa20d 100644 --- a/src/common/HeartbeatMap.cc +++ b/src/common/HeartbeatMap.cc @@ -92,6 +92,8 @@ void HeartbeatMap::reset_timeout(heartbeat_handle_d *h, time_t grace, time_t sui if (suicide_grace) h->suicide_timeout.set(now + suicide_grace); + else + h->suicide_timeout.set(0); h->suicide_grace = suicide_grace; } -- 2.39.5