From 9adcb04498be2c08e2fd10317e5f8dfda86e4989 Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Sun, 6 May 2018 00:56:50 +0400 Subject: [PATCH] Fix volume download --- rpc.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rpc.go b/rpc.go index ca973c8..adb3c3c 100644 --- a/rpc.go +++ b/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 // 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 { _, err = inStream.Write(resp.Payload) if err != nil {