From bfac3da6dc7f0dcdf84ae6f51f18b0b77f5ffc18 Mon Sep 17 00:00:00 2001 From: Yuriy Taraday Date: Sun, 25 Feb 2018 22:35:22 +0400 Subject: [PATCH] Treat only StatusError as error, not StatusContinue --- rpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc.go b/rpc.go index 6e019d0..680060c 100644 --- a/rpc.go +++ b/rpc.go @@ -365,7 +365,7 @@ func (l *Libvirt) sendPacket(serial uint32, proc uint32, program uint32, payload func (l *Libvirt) getResponse(c chan response) (response, error) { resp := <-c - if resp.Status != StatusOK { + if resp.Status == StatusError { return resp, decodeError(resp.Payload) }