Merge pull request #19347 from wanyaoqi/fix/host-deployer-disconnect

fix(host-deployer): check sshclient is nil on disconnect
This commit is contained in:
Zexi Li
2024-01-26 16:04:02 +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