mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 11:16:39 +00:00
fix(sdk): set usbboot control transfer timeout to infinite (#1760)
Change-Type: patch Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
This commit is contained in:
parent
f7b0291bf8
commit
8aa58a722b
@ -45,6 +45,14 @@ _.each([
|
||||
exports[constant] = usb[constant]
|
||||
})
|
||||
|
||||
/**
|
||||
* @summary The timeout for USB control transfers, in milliseconds
|
||||
* @type {Number}
|
||||
* @constant
|
||||
*/
|
||||
// In node-usb, 0 means "infinite" timeout
|
||||
const USB_CONTROL_TRANSFER_TIMEOUT_MS = 0
|
||||
|
||||
/**
|
||||
* @summary List the available USB devices
|
||||
* @function
|
||||
@ -123,6 +131,7 @@ exports.performControlTransfer = (device, options) => {
|
||||
}
|
||||
|
||||
return Bluebird.fromCallback((callback) => {
|
||||
device.timeout = USB_CONTROL_TRANSFER_TIMEOUT_MS
|
||||
device.controlTransfer(
|
||||
options.bmRequestType,
|
||||
options.bRequest,
|
||||
|
Loading…
x
Reference in New Issue
Block a user