From dad05b474371e61314f6923db3450bcc1feabf40 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Sun, 17 Mar 2019 15:27:26 +0000 Subject: [PATCH] usbboot: Even more logs Change-type: patch Signed-off-by: Juan Cruz Viotti --- lib/sdk/adapters/usbboot/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/sdk/adapters/usbboot/index.js b/lib/sdk/adapters/usbboot/index.js index f41ed0c5..c612d44f 100644 --- a/lib/sdk/adapters/usbboot/index.js +++ b/lib/sdk/adapters/usbboot/index.js @@ -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) })