unit
unit copied to clipboard
nodejs unit-http misses close()?
I have notice that during shutdown of NestJS based application which uses express internally I got an error:
TypeError: this.httpServer.close is not a function
at /app/server/node_modules/@nestjs/platform-express/adapters/express-adapter.js:96:55
at new Promise .new Promise (<anonymous> undefined)
at ExpressAdapter.close (/app/server/node_modules/@nestjs/platform-express/adapters/express-adapter.js:96:16 undefined)
at NestApplication.dispose (/app/server/node_modules/@nestjs/core/nest-application.js:47:53 undefined)
at async process.cleanup (/app/server/node_modules/@nestjs/core/nest-application-context.js:189:1
Origin of the error is the close() function https://github.com/nestjs/nest/blob/master/packages/platform-express/adapters/express-adapter.ts#L160 which calls http.close(). As far as I can see unit does not implement this function. Correct me please if I don't understand something.