From: Sage Weil Date: Thu, 28 Jul 2011 16:07:02 +0000 (-0700) Subject: heartbeatmap: fix stupid race X-Git-Tag: v0.33~120 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7aad8f03e0ee78ea7ce192a454a8453cde19688f;p=ceph.git heartbeatmap: fix stupid race atomic_t is probably better here, actually... :/ Signed-off-by: Sage Weil --- diff --git a/src/common/HeartbeatMap.cc b/src/common/HeartbeatMap.cc index dc63d8ebb5c4..8e47b590c463 100644 --- a/src/common/HeartbeatMap.cc +++ b/src/common/HeartbeatMap.cc @@ -68,7 +68,8 @@ bool HeartbeatMap::is_healthy() p != m_workers.end(); ++p) { heartbeat_handle_d *h = *p; - if (h->timeout && h->timeout < now) { + time_t timeout = h->timeout; + if (timeout && timeout < now) { ldout(m_cct, 0) << "is_healthy " << h->thread << " '" << h->name << "'" << " timed out" << dendl; healthy = false;