summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/RoleService.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/backend/src/core/RoleService.ts')
-rw-r--r--packages/backend/src/core/RoleService.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/backend/src/core/RoleService.ts b/packages/backend/src/core/RoleService.ts
index 130ec5ec8c..40ae106662 100644
--- a/packages/backend/src/core/RoleService.ts
+++ b/packages/backend/src/core/RoleService.ts
@@ -433,7 +433,12 @@ export class RoleService implements OnApplicationShutdown {
}
@bindThis
- public onApplicationShutdown(signal?: string | undefined) {
+ public dispose(): void {
this.redisForSub.off('message', this.onMessage);
}
+
+ @bindThis
+ public onApplicationShutdown(signal?: string | undefined): void {
+ this.dispose();
+ }
}