Merge pull request #19350 from wanyaoqi/automated-cherry-pick-of-#19347-upstream-master

Automated cherry pick of #19347: fix(host-deployer): check sshclient is nil on disconnect
This commit is contained in:
Zexi Li
2024-01-26 16:04:34 +08:00
committed by GitHub
+4 -1
View File
@@ -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