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) }