usbboot: Even more logs

Change-type: patch
Signed-off-by: Juan Cruz Viotti <juan@balena.io>
This commit is contained in:
Juan Cruz Viotti 2019-03-17 15:27:26 +00:00
parent ed6fb1888e
commit dad05b4743
No known key found for this signature in database
GPG Key ID: D01B10083038B3E8

View File

@ -449,11 +449,15 @@ class USBBootAdapter extends EventEmitter {
message: 'LIBUSB_TRANSFER_CANCELLED'
}, {
message: 'LIBUSB_ERROR_NO_DEVICE'
}, _.constant(null)).tap((result) => {
}, ((error) => {
debug(`Swallowed error: ${error.message} ${error.stack}`)
return null
})).tap((result) => {
if (result) {
result.close()
}
}).finally(() => {
debug('Reboot delay')
return Bluebird.delay(DEVICE_REBOOT_DELAY).then(() => {
Reflect.deleteProperty(this.progress, device.raw)
})