| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 59be5f8 commit f717c1e
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -45,7 +45,7 @@ const debuglog = util.debuglog('inspect'); | |||
| 45 | 45 | ||
| 46 | 46 | const { ERR_DEBUGGER_STARTUP_ERROR } = require('internal/errors').codes; | |
| 47 | 47 | ||
| 48 | - async function portIsFree(host, port, timeout = 9999) { | ||
| 48 | + async function portIsFree(host, port, timeout = 3000) { | ||
| 49 | 49 | if (port === 0) return; // Binding to a random port. | |
| 50 | 50 | ||
| 51 | 51 | const retryDelay = 150; | |
@@ -64,7 +64,10 @@ async function portIsFree(host, port, timeout = 9999) { | |||
| 64 | 64 | const error = await new Promise((resolve) => { | |
| 65 | 65 | const socket = net.connect(port, host); | |
| 66 | 66 | socket.on('error', resolve); | |
| 67 | - socket.on('connect', resolve); | ||
| 67 | + socket.on('connect', () => { | ||
| 68 | + socket.end(); | ||
| 69 | + resolve(); | ||
| 70 | + }); | ||
| 68 | 71 | }); | |
| 69 | 72 | if (error?.code === 'ECONNREFUSED') { | |
| 70 | 73 | return; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,7 +7,13 @@ const BREAK_MESSAGE = new RegExp('(?:' + [ | |||
| 7 | 7 | 'exception', 'other', 'promiseRejection', | |
| 8 | 8 | ].join('|') + ') in', 'i'); | |
| 9 | 9 | ||
| 10 | - const TIMEOUT = common.platformTimeout(5000); | ||
| 10 | + let TIMEOUT = common.platformTimeout(5000); | ||
| 11 | + if (common.isWindows) { | ||
| 12 | + // Some of the windows machines in the CI need more time to receive | ||
| 13 | + // the outputs from the client. | ||
| 14 | + // https://github.com/nodejs/build/issues/3014 | ||
| 15 | + TIMEOUT = common.platformTimeout(15000); | ||
| 16 | + } | ||
| 11 | 17 | ||
| 12 | 18 | function isPreBreak(output) { | |
| 13 | 19 | return /Break on start/.test(output) && /1 \(function \(exports/.test(output); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments