From 37737a7ef028a8dd73bc499ef36d56bbe18c23f8 Mon Sep 17 00:00:00 2001 From: Jonatan Nilsson Date: Sun, 13 Sep 2020 15:23:21 +0000 Subject: [PATCH] Fix a bug in http server where it never gracefully migrates to new version without restart --- core/http.mjs | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/http.mjs b/core/http.mjs index 8379f9a..cecf2b9 100644 --- a/core/http.mjs +++ b/core/http.mjs @@ -49,7 +49,7 @@ export default class HttpServer { if (!this.active[name]) return false try { - await new Promise((res, rej) => { + return await new Promise((res, rej) => { this.sockets[name].forEach(function(socket) { socket.destroy() }) diff --git a/package.json b/package.json index 7fd9fe1..ea7d094 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "service-core", - "version": "2.0.0", + "version": "2.0.1", "description": "Core boiler plate code to install node server as windows service", "main": "lib.mjs", "scripts": {