]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: stop/join TokenCache revoke thread only if started. 18106/head
authorKarol Mroz <kmroz@suse.de>
Mon, 2 Oct 2017 21:01:47 +0000 (14:01 -0700)
committerKarol Mroz <kmroz@suse.de>
Wed, 4 Oct 2017 01:12:41 +0000 (18:12 -0700)
Thread::join triggers an assert otherwise.

Fixes http://tracker.ceph.com/issues/21666

Signed-off-by: Karol Mroz <kmroz@suse.de>
src/rgw/rgw_keystone.h

index 3add9ae8a4c091b6905641e359ea644bbfd3a418..1cdbae519c94f5e01beced11688859d8c1f4e154 100644 (file)
@@ -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: