From 64ebcdba9f149bfc9e07ae9410b887f2509a71b9 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Wed, 12 Jul 2017 19:15:21 -0700 Subject: [PATCH] Do not close readline after reading remote debugging port Closing readline interface results in closing underlying stream. We don't want this. --- lib/Browser.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Browser.js b/lib/Browser.js index 2555b6a7..8dd074a3 100644 --- a/lib/Browser.js +++ b/lib/Browser.js @@ -155,9 +155,8 @@ function waitForRemoteDebuggingPort(chromeProcess) { const match = line.match(/^DevTools listening on .*:([\d]+)$/); if (!match) return; - fulfill(Number.parseInt(match[1], 10)); rl.removeListener('line', onLine); - rl.close(); + fulfill(Number.parseInt(match[1], 10)); } }