From: Karol Mroz Date: Mon, 2 Oct 2017 21:01:47 +0000 (-0700) Subject: rgw: stop/join TokenCache revoke thread only if started. X-Git-Tag: v13.0.1~663^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F18106%2Fhead;p=ceph.git rgw: stop/join TokenCache revoke thread only if started. Thread::join triggers an assert otherwise. Fixes http://tracker.ceph.com/issues/21666 Signed-off-by: Karol Mroz --- diff --git a/src/rgw/rgw_keystone.h b/src/rgw/rgw_keystone.h index 3add9ae8a4c..1cdbae519c9 100644 --- a/src/rgw/rgw_keystone.h +++ b/src/rgw/rgw_keystone.h @@ -277,8 +277,11 @@ class TokenCache { ~TokenCache() { down_flag = true; - revocator.stop(); - revocator.join(); + // Only stop and join if revocator thread is started. + if (revocator.is_started()) { + revocator.stop(); + revocator.join(); + } } public: