]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/ceph_context: avoid unnecessary wait during service thread shutdown 31097/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 15 Oct 2019 22:19:15 +0000 (18:19 -0400)
committerNathan Cutler <ncutler@suse.com>
Wed, 23 Oct 2019 19:54:29 +0000 (21:54 +0200)
Fixes: https://tracker.ceph.com/issues/42332
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit e8249d3b28f8789b2d4aca6fb75c75103a5cbea1)

src/common/ceph_context.cc

index 3d70344d212ca0759acefef17254158c92ba7bab..d454593686fa5c07be073f25ffbb3786cd1d7095 100644 (file)
@@ -196,6 +196,9 @@ public:
   {
     while (1) {
       std::unique_lock l(_lock);
+      if (_exit_thread) {
+        break;
+      }
 
       if (_cct->_conf->heartbeat_interval) {
         auto interval = ceph::make_timespan(_cct->_conf->heartbeat_interval);