=Fixed problem with the stoppable wrapper not triggering the listen method on the http server object

This commit is contained in:
Tobias Andersen
2020-08-20 11:11:53 +02:00
parent 141bb0b9ab
commit 0ee6ba4049
@@ -218,9 +218,12 @@ export class ServiceBuilderImpl implements ServiceBuilder {
server = http.createServer(app);
}
const stoppableServer = stoppable(server, 0);
const stoppableServer = stoppable(
server.listen(port, host, () => {
logger.info(`Listening on ${host}:${port}`);
}), 0);
stoppableServer.listen(port, host);
//stoppableServer.listen(port, host);
useHotCleanup(this.module, () =>
stoppableServer.stop((e: any) => {