mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 15:31:42 +00:00
Update chrome.js
This commit is contained in:
parent
09aa593c53
commit
a0a1076e0f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user