From: Nizamudeen A Date: Tue, 12 Aug 2025 04:15:54 +0000 (+0530) Subject: mgr/dashboard: close token status subscription properly X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=79729c4ece92d5fdd2f5bed50c203a1a7077be14;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 --- 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()); }