From b616e879474f72333a73db1d879abf5b5ba36f1d Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Thu, 17 Aug 2017 14:53:25 +0800 Subject: [PATCH] test: fix inspector helper port sniffing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/13870 Reviewed-By: Miroslav Bajtoš --- test/inspector/inspector-helper.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/inspector/inspector-helper.js b/test/inspector/inspector-helper.js index e9464c3679a00c..11e86395407b5c 100644 --- a/test/inspector/inspector-helper.js +++ b/test/inspector/inspector-helper.js @@ -325,9 +325,10 @@ class NodeInstance { console.log('[err]', line); if (this._portCallback) { const matches = line.match(/Debugger listening on ws:\/\/.+:(\d+)\/.+/); - if (matches) + if (matches) { this._portCallback(matches[1]); - this._portCallback = null; + this._portCallback = null; + } } if (this._stderrLineCallback) { this._stderrLineCallback(line);