diff options
author | Guillaume Rose <gurose@redhat.com> | 2021-09-03 09:06:53 +0200 |
---|---|---|
committer | Guillaume Rose <gurose@redhat.com> | 2021-09-03 09:10:35 +0200 |
commit | 90998176d9e8cf38453f1d9d420ca5628abbb140 (patch) | |
tree | cffdd7b17b37553285c4a69e50810cdb61121626 /pkg/machine/qemu | |
parent | 858d3e47c26788e64083842cc6617b666f4279a1 (diff) | |
download | podman-90998176d9e8cf38453f1d9d420ca5628abbb140.tar.gz podman-90998176d9e8cf38453f1d9d420ca5628abbb140.tar.bz2 podman-90998176d9e8cf38453f1d9d420ca5628abbb140.zip |
machine: always check error of net.Dial, even after last try
When net.Dial always fail in the above loop, the code following the loop
is executed. This error check prevents this.
[NO TESTS NEEDED]
Signed-off-by: Guillaume Rose <gurose@redhat.com>
Diffstat (limited to 'pkg/machine/qemu')
-rw-r--r-- | pkg/machine/qemu/machine.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index 38a16c3ef..dc7703724 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -278,6 +278,9 @@ func (v *MachineVM) Start(name string, _ machine.StartOptions) error { time.Sleep(wait) wait++ } + if err != nil { + return err + } fd, err := qemuSocketConn.(*net.UnixConn).File() if err != nil { |