Skip to content

Commit

Permalink
Merge pull request #19350 from wanyaoqi/automated-cherry-pick-of-#193…
Browse files Browse the repository at this point in the history
…47-upstream-master

Automated cherry pick of #19347: fix(host-deployer): check sshclient is nil on disconnect
  • Loading branch information
zexi authored Jan 26, 2024
2 parents a4a1794 + f5e14d6 commit 01131cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/hostman/diskutils/qemu_kvm/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,10 @@ func (d *QemuKvmDriver) connect(guestDesc *apis.GuestDesc) error {
}

func (d *QemuKvmDriver) Disconnect() error {
d.sshClient.Close()
if d.sshClient != nil {
d.sshClient.Close()
}

d.qemuArchDriver.CleanGuest()
d.qemuArchDriver = nil
return nil
Expand Down

0 comments on commit 01131cc

Please sign in to comment.