mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 22:53:35 +02:00
If device gets unplugged after a service fails (happens easily because the socket dies), don't log a provider error.
This commit is contained in:
@@ -166,6 +166,11 @@ module.exports = function(options) {
|
||||
worker = workers[device.id] = null
|
||||
})
|
||||
.catch(procutil.ExitError, function(err) {
|
||||
log.error(
|
||||
'Device worker "%s" died with code %s'
|
||||
, device.id
|
||||
, err.code
|
||||
)
|
||||
log.info('Restarting device worker "%s"', device.id)
|
||||
return Promise.delay(500)
|
||||
.then(function() {
|
||||
@@ -203,11 +208,6 @@ module.exports = function(options) {
|
||||
resolver.resolve()
|
||||
}
|
||||
else {
|
||||
log.error(
|
||||
'Device worker "%s" died with code %s'
|
||||
, device.id
|
||||
, code
|
||||
)
|
||||
resolver.reject(new procutil.ExitError(code))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user