Skip to content

Commit

Permalink
fix(setupServer): call this.init() in .listen()
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Dec 6, 2024
1 parent ab3231d commit 4f32a94
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/node/SetupServerCommonApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ export class SetupServerCommonApi
})

this.resolvedOptions = {} as RequiredDeep<SharedOptions>

this.init()
}

/**
Expand Down Expand Up @@ -141,7 +139,10 @@ export class SetupServerCommonApi
) as RequiredDeep<SharedOptions>

// 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.
Expand Down

0 comments on commit 4f32a94

Please sign in to comment.