Do not close readline after reading remote debugging port

Closing readline interface results in closing underlying
stream. We don't want this.
This commit is contained in:
Andrey Lushnikov 2017-07-12 19:15:21 -07:00
parent b3d38a1b8d
commit 64ebcdba9f

View File

@ -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));
}
}