usbboot: Delay on each bulk transfer chunk

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

View File

@ -249,7 +249,7 @@ exports.write = (device, endpoint, buffer) => {
return Bluebird.fromCallback((callback) => { return Bluebird.fromCallback((callback) => {
console.log(`SENDING CHUNK: ${chunk.length}`) console.log(`SENDING CHUNK: ${chunk.length}`)
endpoint.transfer(chunk, callback) endpoint.transfer(chunk, callback)
}) }).delay(USB_REQUEST_DELAY_MS)
}) })
}) })
} }