fix(vhd-lib/parseVhdStream): also consume stream in NBD mode (#6613)

Consuming the stream is necessary for all writers including DeltaBackupWriter) otherwise other writers (e.g. DeltaBackupWriter i.e. CR) will stay stuck.
This commit is contained in:
Florent BEAUCHAMP
2023-01-16 10:54:45 +01:00
committed by GitHub
parent a2d9310d0a
commit 6c44a94bf4

View File

@@ -242,9 +242,11 @@ class StreamNbdParser extends StreamParser {
async *parse() {
yield* this.headers()
// put it in free flowing state
// the stream is a fork from the main stream of xapi
// if one of the fork is stopped, all the stream are stopped
this._stream.resume()
yield* this.blocks()
// @todo : should we destroy it earlier ?
this._stream.destroy()
}
}