mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
style(usbboot): wait before scanning drives after the file server phase (#1799)
This is a workaround to prevent the USB device from disappearing after the file server phase, until the resulting block device comes up. By adding a delay after the file server phase, we prevent the USB scanner from getting triggered again, therefore keeping the current USB device visible in the drive selector modal. Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit is contained in:
parent
daa847d29b
commit
eba06a2139
@ -273,6 +273,11 @@ class USBBootAdapter extends EventEmitter {
|
||||
}
|
||||
|
||||
result.progress = this.progress[result.raw]
|
||||
|
||||
if (result.progress === utils.PERCENTAGE_MAXIMUM) {
|
||||
return Bluebird.delay(DEVICE_REBOOT_DELAY).return(result)
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
// See http://bluebirdjs.com/docs/api/promise.map.html
|
||||
|
Loading…
x
Reference in New Issue
Block a user