mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 03:53:22 +02:00
This fixes bug with leaking ports when emulator or device is rebooted
Change handler order for device worker promise
This commit is contained in:
committed by
Simo Kinnunen
parent
93cbca0dbf
commit
63401dc536
@@ -232,6 +232,7 @@ module.exports = function(options) {
|
||||
lists.waiting.push(device.id)
|
||||
|
||||
return resolver.promise
|
||||
.cancellable()
|
||||
.finally(function() {
|
||||
log.info('Cleaning up device worker "%s"', device.id)
|
||||
|
||||
@@ -246,7 +247,6 @@ module.exports = function(options) {
|
||||
_.pull(lists.ready, device.id)
|
||||
_.pull(lists.waiting, device.id)
|
||||
})
|
||||
.cancellable()
|
||||
.catch(Promise.CancellationError, function() {
|
||||
log.info('Gracefully killing device worker "%s"', device.id)
|
||||
return procutil.gracefullyKill(proc, options.killTimeout)
|
||||
|
||||
Reference in New Issue
Block a user