fix(host): check qga is init on check qga runing (#21308)

This commit is contained in:
wanyaoqi
2024-09-27 00:35:00 +08:00
committed by GitHub
parent a4f086fa6e
commit 6a3ddc131a
+4
View File
@@ -493,6 +493,10 @@ func (m *SGuestManager) GetQgaRunningGuests() []string {
return true
}
if guest.guestAgent == nil {
// in case guestAgent not init
return true
}
if guest.guestAgent.TryLock() {
defer guest.guestAgent.Unlock()
err := guest.guestAgent.GuestPing(1)