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

Fixes bsc#1059458
Fixes http://tracker.ceph.com/issues/21666

Signed-off-by: Karol Mroz <kmroz@suse.de>
(cherry picked from commit 26f2da083c7dd21b89c1c1e6c498b14e034364a6)

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: