diff options
Diffstat (limited to 'src/osd/OSD.cc')
-rw-r--r-- | src/osd/OSD.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 5479b598dc6..834083fabe7 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4957,9 +4957,9 @@ void OSD::heartbeat() bool OSD::heartbeat_reset(Connection *con) { + std::lock_guard l(heartbeat_lock); auto s = con->get_priv(); if (s) { - heartbeat_lock.Lock(); if (is_stopping()) { heartbeat_lock.Unlock(); return true; @@ -4996,7 +4996,6 @@ bool OSD::heartbeat_reset(Connection *con) } else { dout(10) << "heartbeat_reset closing (old) failed hb con " << con << dendl; } - heartbeat_lock.Unlock(); } return true; } |