MCPcopy
hub / github.com/nestjs/nest / dispose

Method dispose

packages/core/nest-application.ts:98–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

96 }
97
98 protected async dispose(): Promise<void> {
99 this.socketModule && (await this.socketModule.close());
100 this.microservicesModule && (await this.microservicesModule.close());
101 this.httpAdapter && (await this.httpAdapter.close());
102
103 await Promise.all(
104 iterate(this.microservices).map(async microservice => {
105 microservice.setIsTerminated(true);
106 await microservice.close();
107 }),
108 );
109 }
110
111 public getHttpAdapter(): AbstractHttpAdapter {
112 return this.httpAdapter as AbstractHttpAdapter;

Callers 3

closeMethod · 0.45
bootstrapFunction · 0.45
bootstrapFunction · 0.45

Calls 3

allMethod · 0.80
setIsTerminatedMethod · 0.80
closeMethod · 0.65

Tested by

no test coverage detected