]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/ceph_context: avoid unnecessary wait during service thread shutdown 31096/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:51:55 +0000 (21:51 +0200)
Fixes: https://tracker.ceph.com/issues/42332
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit e8249d3b28f8789b2d4aca6fb75c75103a5cbea1)

Conflicts:
src/common/ceph_context.cc
- Mutex::Locker

src/common/ceph_context.cc

index 014741b276fe6ff22737a828fcbc1f0d3b0eca38..5535288911f71f785e600b9f4283d7034bd139bd 100644 (file)
@@ -141,6 +141,9 @@ public:
   {
     while (1) {
       Mutex::Locker l(_lock);
+      if (_exit_thread) {
+        break;
+      }
 
       if (_cct->_conf->heartbeat_interval) {
         utime_t interval(_cct->_conf->heartbeat_interval, 0);