Browse Source
fastcgi: Use request context as base, not a new one
master
Matthew Holt
5 years ago
No known key found for this signature in database
GPG Key ID: 2A349DD577D586A5
1 changed files with
1 additions and
1 deletions
-
modules/caddyhttp/reverseproxy/fastcgi/fastcgi.go
|
|
@ -92,7 +92,7 @@ func (t Transport) RoundTrip(r *http.Request) (*http.Response, error) { |
|
|
|
} |
|
|
|
|
|
|
|
// TODO: doesn't dialer have a Timeout field?
|
|
|
|
ctx := context.Background() |
|
|
|
ctx := r.Context() |
|
|
|
if t.DialTimeout > 0 { |
|
|
|
var cancel context.CancelFunc |
|
|
|
ctx, cancel = context.WithTimeout(ctx, time.Duration(t.DialTimeout)) |
|
|
|