mirror of
https://github.com/openstf/stf
synced 2025-10-04 10:19:30 +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:
parent
adaf3da228
commit
3e7d91cb91
1 changed files with 5 additions and 5 deletions
|
@ -166,6 +166,11 @@ module.exports = function(options) {
|
||||||
worker = workers[device.id] = null
|
worker = workers[device.id] = null
|
||||||
})
|
})
|
||||||
.catch(procutil.ExitError, function(err) {
|
.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)
|
log.info('Restarting device worker "%s"', device.id)
|
||||||
return Promise.delay(500)
|
return Promise.delay(500)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
|
@ -203,11 +208,6 @@ module.exports = function(options) {
|
||||||
resolver.resolve()
|
resolver.resolve()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
log.error(
|
|
||||||
'Device worker "%s" died with code %s'
|
|
||||||
, device.id
|
|
||||||
, code
|
|
||||||
)
|
|
||||||
resolver.reject(new procutil.ExitError(code))
|
resolver.reject(new procutil.ExitError(code))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue