]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: close token status subscription properly
authorNizamudeen A <nia@redhat.com>
Tue, 12 Aug 2025 04:15:54 +0000 (09:45 +0530)
committerNizamudeen A <nia@redhat.com>
Tue, 19 Aug 2025 05:57:29 +0000 (11:27 +0530)
Since its not returning any subscription back to the `this.subs`
property, those subscriptions are not properly closed in the
workbench-layout when its destroyed. So ensuring proper return

Fixes: https://tracker.ceph.com/issues/72530
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit 79729c4ece92d5fdd2f5bed50c203a1a7077be14)

src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.ts

index 0aa57437f25211ff6dc07aa141777b86b48f9592..e17c1a741aa84ab99d07b98e03d72d520be1eac0 100644 (file)
@@ -33,12 +33,12 @@ export class MultiClusterService {
   }
 
   startClusterTokenStatusPolling() {
-    this.checkAndStartTimer();
+    return this.checkAndStartTimer();
   }
 
   private checkAndStartTimer() {
     this.checkTokenStatus().subscribe(this.getClusterTokenStatusObserver());
-    this.timerService
+    return this.timerService
       .get(() => this.checkTokenStatus(), this.TOKEN_CHECK_INTERVAL)
       .subscribe(this.getClusterTokenStatusObserver());
   }