diff --git a/api/internal/utils/timedcall.go b/api/internal/utils/timedcall.go index 0afadd0c3f2..cda53f864ba 100644 --- a/api/internal/utils/timedcall.go +++ b/api/internal/utils/timedcall.go @@ -10,7 +10,7 @@ import ( // TimedCall runs fn, failing if it doesn't complete in the given duration. // The description is used in the timeout error message. func TimedCall(description string, d time.Duration, fn func() error) error { - done := make(chan error) + done := make(chan error, 1) timer := time.NewTimer(d) defer timer.Stop() go func() { done <- fn() }()