mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fix(host): isolated device probe closure reference for range val (#20988)
This commit is contained in:
@@ -2193,7 +2193,10 @@ func (h *SHostInfo) probeSyncIsolatedDevices() (*jsonutils.JSONArray, error) {
|
||||
eg := errgroup.Group{}
|
||||
mtx := sync.Mutex{}
|
||||
updateDevs := jsonutils.NewArray()
|
||||
for _, dev := range h.IsolatedDeviceMan.GetDevices() {
|
||||
|
||||
devs := h.IsolatedDeviceMan.GetDevices()
|
||||
for i := range devs {
|
||||
dev := devs[i]
|
||||
eg.Go(func() error {
|
||||
if obj, err := isolated_device.SyncDeviceInfo(h.GetSession(), h.HostId, dev); err != nil {
|
||||
return errors.Wrapf(err, "Sync device %s", dev)
|
||||
|
||||
Reference in New Issue
Block a user