Skip to content

Commit

Permalink
fix: potential deadlock
Browse files Browse the repository at this point in the history
Signed-off-by: l1b0k <[email protected]>
  • Loading branch information
l1b0k committed Jan 24, 2025
1 parent 362d41b commit da5f2f2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/eni/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ func (m *Manager) Allocate(ctx context.Context, cni *daemon.CNI, req *AllocReque
cancel()
break
}
resultCh <- resp.NetworkConfigs

select {
case <-ctx.Done():
case resultCh <- resp.NetworkConfigs:
}
}
}()
}
Expand Down

0 comments on commit da5f2f2

Please sign in to comment.