From 4f32a94bb7ac90097667dab57845814deefb53fe Mon Sep 17 00:00:00 2001 From: Artem Zakharchenko Date: Fri, 6 Dec 2024 13:49:25 +0100 Subject: [PATCH] fix(setupServer): call `this.init()` in `.listen()` --- src/node/SetupServerCommonApi.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/node/SetupServerCommonApi.ts b/src/node/SetupServerCommonApi.ts index 0f054749a..0c6050f4c 100644 --- a/src/node/SetupServerCommonApi.ts +++ b/src/node/SetupServerCommonApi.ts @@ -48,8 +48,6 @@ export class SetupServerCommonApi }) this.resolvedOptions = {} as RequiredDeep - - this.init() } /** @@ -141,7 +139,10 @@ export class SetupServerCommonApi ) as RequiredDeep // Apply the interceptor when starting the server. + // Attach the event listeners to the interceptor here + // so they get re-attached whenever `.listen()` is called. this.interceptor.apply() + this.init() this.subscriptions.push(() => this.interceptor.dispose()) // Apply the WebSocket interception.