aboutsummaryrefslogtreecommitdiff
path: root/src/testing
diff options
context:
space:
mode:
Diffstat (limited to 'src/testing')
-rw-r--r--src/testing/internal/testdeps/deps.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/testing/internal/testdeps/deps.go b/src/testing/internal/testdeps/deps.go
index dbc30ddc0f..2d0d7bac38 100644
--- a/src/testing/internal/testdeps/deps.go
+++ b/src/testing/internal/testdeps/deps.go
@@ -146,7 +146,7 @@ func (TestDeps) CoordinateFuzzing(timeout time.Duration, parallel int, seed [][]
<-interruptC
cancel()
}()
- defer close(interruptC)
+ defer func() { interruptC <- os.Interrupt }()
err := fuzz.CoordinateFuzzing(ctx, parallel, seed, corpusDir, cacheDir)
if err == ctx.Err() {
@@ -169,7 +169,7 @@ func (TestDeps) RunFuzzWorker(fn func([]byte) error) error {
<-interruptC
cancel()
}()
- defer close(interruptC)
+ defer func() { interruptC <- os.Interrupt }()
err := fuzz.RunFuzzWorker(ctx, fn)
if err == ctx.Err() {