From 4189a7f1a3a6045d56d85890abc3d57813bddc31 Mon Sep 17 00:00:00 2001 From: Bart Versluijs Date: Wed, 28 Dec 2022 21:57:24 +0100 Subject: [PATCH] feat(core): pass signal when manually invoking close --- packages/core/nest-application-context.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/nest-application-context.ts b/packages/core/nest-application-context.ts index d050b51d099..9f5367f3033 100644 --- a/packages/core/nest-application-context.ts +++ b/packages/core/nest-application-context.ts @@ -227,11 +227,11 @@ export class NestApplicationContext * Terminates the application * @returns {Promise} */ - public async close(): Promise { + public async close(signal?: string): Promise { await this.callDestroyHook(); - await this.callBeforeShutdownHook(); + await this.callBeforeShutdownHook(signal); await this.dispose(); - await this.callShutdownHook(); + await this.callShutdownHook(signal); this.unsubscribeFromProcessSignals(); }