You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In timeout.go, context cancellation isn't check for when running the command goroutine. This causes the errc <- next.Run(ctx, f) call to block indefinitely if the command times out.
ctx, _=context.WithTimeout(ctx, cfg.Timeout)
// Run the commanderrc:=make(chanerror)
gofunc() {
errc<-next.Run(ctx, f) //This blocks indefinitely if the context is cancelled due to a timeout.
}()
// Wait until the deadline has been reached or we have a result.select {
// Finished correctly.caseerr:=<-errc:
returnerr// Timeout.case<-ctx.Done():
metricsRecorder.IncTimeout()
returnerrors.ErrTimeout
}
In
timeout.go
, context cancellation isn't check for when running the command goroutine. This causes theerrc <- next.Run(ctx, f)
call to block indefinitely if the command times out.The simple fix is to select:
The text was updated successfully, but these errors were encountered: