Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Fix: Stop auto-refresh logs / tasks after close (#5089)

shamoon945fb675e974
diff --git a/src-ui/src/app/components/admin/logs/logs.component.ts b/src-ui/src/app/components/admin/logs/logs.component.ts
index 2ca259218..0c1231a48 100644
--- a/src-ui/src/app/components/admin/logs/logs.component.ts
+++ b/src-ui/src/app/components/admin/logs/logs.component.ts
@@ -54,6 +54,7 @@ export class LogsComponent implements OnInit, AfterViewChecked, OnDestroy {
ngOnDestroy(): void {
this.unsubscribeNotifier.next(true)
this.unsubscribeNotifier.complete()
+ clearInterval(this.autoRefreshInterval)
}
reloadLogs() {
diff --git a/src-ui/src/app/components/admin/tasks/tasks.component.ts b/src-ui/src/app/components/admin/tasks/tasks.component.ts
index 5a1949e77..b6b5ec590 100644
--- a/src-ui/src/app/components/admin/tasks/tasks.component.ts
+++ b/src-ui/src/app/components/admin/tasks/tasks.component.ts
@@ -46,6 +46,7 @@ export class TasksComponent
ngOnDestroy() {
this.tasksService.cancelPending()
+ clearInterval(this.autoRefreshInterval)
}
dismissTask(task: PaperlessTask) {