mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user