]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/ceph_timer: stop timer's thread when it is suspended 26579/head
authorPeng Wang <wp389@126.com>
Sun, 17 Feb 2019 09:47:52 +0000 (17:47 +0800)
committerPrashant D <pdhange@redhat.com>
Fri, 22 Feb 2019 01:50:54 +0000 (20:50 -0500)
otherwise the client could hang when shutting down

Fixes: https://tracker.ceph.com/issues/37766
Signed-off-by: Peng Wang <wp389@126.com>
(cherry picked from commit a942722c5bffbacc8d30643dd9863ef844f0617e)

src/common/ceph_timer.h

index 4b7438672d409bc78c2fd99c49758276eab54c28..8e933012294b9ae6cb374e8dc1d86dd4e1f6a3b4 100644 (file)
@@ -138,6 +138,8 @@ namespace ceph {
            } // Otherwise the event requeued itself
          }
 
+          if (suspended)
+            break;
          if (schedule.empty())
            cond.wait(l);
          else