Closed Choraden closed 5 months ago
Thinking about the http.Transport behaviour[1] maybe we should be doing the same. This is always set a constant 60s timeout not to leak any goroutines. After all we support context cancellation.
[1] https://cs.opensource.google/go/go/+/refs/tags/go1.22.2:src/net/http/transport.go;l=1727
This looks good to me.
newCtx, cancel := context.WithTimeout(ctx, 1*time.Minute)
Fixes #781