mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-21 12:05:00 +00:00
Always send the final progress event
This commit is contained in:
parent
004286a07e
commit
f6eafb7b96
@ -51,6 +51,8 @@ exports.rsyncImageWithProgress = (imgDest, onProgress) ->
|
||||
console.log("#{config.deltaHost}/api/v1/delta?src=#{imgSrc}&dest=#{imgDest}", timeout: 0)
|
||||
progress request.get("#{config.deltaHost}/api/v1/delta?src=#{imgSrc}&dest=#{imgDest}", timeout: 0)
|
||||
.on 'progress', onProgress
|
||||
.on 'end', ->
|
||||
onProgress(percent: 100)
|
||||
.on 'response', (res) ->
|
||||
if res.statusCode isnt 200
|
||||
reject()
|
||||
|
Loading…
Reference in New Issue
Block a user