Skip to content

Commit 4ef283c

Browse files
authored
Merge pull request #3843 from eoscloud/fix/network-startup-shared-err-panic
incusd/networks: Fix panic when a network fails to start
2 parents cb70265 + 7b38653 commit 4ef283c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cmd/incusd/networks.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,8 @@ func networkStartup(s *state.State) error {
18131813
var initNetworksMu sync.Mutex
18141814

18151815
initNetwork := func(n network.Network, priority int) error {
1816-
err = n.Start()
1816+
// Use a local error variable as this runs concurrently.
1817+
err := n.Start()
18171818
if err != nil {
18181819
err = fmt.Errorf("Failed starting: %w", err)
18191820

0 commit comments

Comments
 (0)