mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fix(region): skip useless addition network wire create (#24893)
This commit is contained in:
@@ -191,9 +191,11 @@ func (net *SNetwork) syncAdditionalWires(ctx context.Context, wireIds []string)
|
||||
}
|
||||
markedPtr = &marked
|
||||
}
|
||||
err := NetworkAdditionalWireManager.newRecord(ctx, net.Id, w.Id, &connected, markedPtr)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "NetworkAdditionalWireManager.newRecord")
|
||||
if connected || (markedPtr != nil && *markedPtr) {
|
||||
err := NetworkAdditionalWireManager.newRecord(ctx, net.Id, w.Id, &connected, markedPtr)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "NetworkAdditionalWireManager.newRecord")
|
||||
}
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user