mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 08:13:31 +02:00
devutil.killProcsByComm() was not falling back to SIGKILL like it should have been. Fixed. Also added a small delay between kill checks.
This commit is contained in:
@@ -120,7 +120,10 @@ devutil.waitForProcsToDie = function(adb, serial, comm, bin) {
|
||||
return devutil.listPidsByComm(adb, serial, comm, bin)
|
||||
.then(function(pids) {
|
||||
if (pids.length) {
|
||||
return devutil.waitForProcsToDie(adb, serial, comm, bin)
|
||||
return Promise.delay(100)
|
||||
.then(function() {
|
||||
return devutil.waitForProcsToDie(adb, serial, comm, bin)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -140,8 +143,8 @@ devutil.killProcsByComm = function(adb, serial, comm, bin, mode) {
|
||||
.then(function() {
|
||||
return devutil.waitForProcsToDie(adb, serial, comm, bin)
|
||||
})
|
||||
.timeout(1000)
|
||||
.then(function() {
|
||||
.timeout(2000)
|
||||
.catch(function() {
|
||||
return devutil.killProcsByComm(adb, serial, comm, bin, -9)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user