Fix volume download
This commit is contained in:
parent
7442c709b1
commit
9adcb04498
4
rpc.go
4
rpc.go
@ -310,6 +310,10 @@ func (l *Libvirt) processIncomingStream(c chan response, inStream io.Writer) (re
|
|||||||
}
|
}
|
||||||
// StatusError is handled in getResponse, so this is StatusContinue
|
// StatusError is handled in getResponse, so this is StatusContinue
|
||||||
// StatusContinue is valid here only for stream packets
|
// StatusContinue is valid here only for stream packets
|
||||||
|
// libvirtd breaks protocol and returns StatusContinue with empty Payload when stream finishes
|
||||||
|
if len(resp.Payload) == 0 {
|
||||||
|
return resp, nil
|
||||||
|
}
|
||||||
if inStream != nil {
|
if inStream != nil {
|
||||||
_, err = inStream.Write(resp.Payload)
|
_, err = inStream.Write(resp.Payload)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user