From c2ab7c246f2b1ee153b340ff3a625d00d17fea30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Y=C4=B1lmaz=20Durmaz?= Date: Sun, 11 Aug 2019 20:14:08 +0300 Subject: [PATCH] portIsFree timeout increased In windows, assigning a port may take a little longer than previously assumed value of 2000ms. I am using Windows 10 1903 64bit, and it takes about 3000ms to initialize a port. I increased the timeout to some higher value (9999ms) to give a little more space to Windows to initialize a port to use with the app. This patch probably solves issues #48, #54 and #70 --- lib/_inspect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_inspect.js b/lib/_inspect.js index aa1dcdc..aac278d 100644 --- a/lib/_inspect.js +++ b/lib/_inspect.js @@ -49,7 +49,7 @@ class StartupError extends Error { } } -function portIsFree(host, port, timeout = 2000) { +function portIsFree(host, port, timeout = 9999) { if (port === 0) return Promise.resolve(); // Binding to a random port. const retryDelay = 150;