diff --git a/pkg/eni/manager.go b/pkg/eni/manager.go index 861201ed..77ab0823 100644 --- a/pkg/eni/manager.go +++ b/pkg/eni/manager.go @@ -207,7 +207,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: + } } }() }