Skip to content

Commit

Permalink
Merge pull request #836 from ignacionar/#827
Browse files Browse the repository at this point in the history
#827 Catching adb client
  • Loading branch information
vdelendik authored Nov 29, 2023
2 parents 914f4b5 + 184f708 commit cd68589
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/units/provider/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ module.exports = function(options) {
})

// Track and manage devices
client.trackDevices().then(function(tracker) {
client.trackDevices()
.then(function(tracker) {
// This can happen when ADB doesn't have a good connection to
// the device
function isWeirdUnusableDevice(device) {
Expand Down Expand Up @@ -178,8 +179,8 @@ module.exports = function(options) {
})

register.catch(function(err) {
log.error('Register error', err)
process.exit(1)
log.fatal('Register promise error', err)
lifecycle.fatal()
})

// Spawn a device worker
Expand Down Expand Up @@ -432,6 +433,10 @@ module.exports = function(options) {

lifecycle.share('Tracker', tracker)
})
.catch(function(err) {
log.fatal('Adb client error', err)
lifecycle.fatal()
})

lifecycle.observe(function() {
[push, sub].forEach(function(sock) {
Expand Down

0 comments on commit cd68589

Please sign in to comment.