From: Nizamudeen A Date: Tue, 12 Aug 2025 04:15:54 +0000 (+0530) Subject: mgr/dashboard: close token status subscription properly X-Git-Tag: v20.1.1~98^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F65114%2Fhead;p=ceph.git mgr/dashboard: close token status subscription properly 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 (cherry picked from commit 79729c4ece92d5fdd2f5bed50c203a1a7077be14) --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.ts index 0aa57437f252..e17c1a741aa8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/multi-cluster.service.ts @@ -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()); }