diff --git a/pkg/eni/manager.go b/pkg/eni/manager.go index 13adefbc..85cb10fa 100644 --- a/pkg/eni/manager.go +++ b/pkg/eni/manager.go @@ -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: + } } }() }