Update chrome.js

This commit is contained in:
Namhyeon Go 2021-08-05 11:39:29 +09:00 committed by GitHub
parent 09aa593c53
commit a0a1076e0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -495,16 +495,22 @@ var ChromeObject = function() {
this.checkDebuggingPort = function() {
var isChecked = false;
var isDone = false;
try {
if (this.debuggingPort > 0) {
var result = SHELL.exec("netstat -ano | findstr :" + this.debuggingPort);
if (result.indexOf(":" + this.debuggingPort) > -1) {
isChecked = true;
while (!isDone) {
try {
if (this.debuggingPort > 0) {
var result = SHELL.exec("netstat -ano | findstr :" + this.debuggingPort);
if (result.indexOf(":" + this.debuggingPort) > -1) {
isChecked = true;
}
}
isDone = true;
} catch(e) {
sleep(1);
console.error("ChromeObject.checkDebuggingPort() -> " + e.message);
}
} catch(e) {
console.error("ChromeObject.checkDebuggingPort() -> " + e.message);
}
return isChecked;