| 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; |