mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-27 04:15:55 +03:00
fastcgi: Use request context as base, not a new one
This commit is contained in:
parent
d2e46c2be0
commit
21d7b662e7
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ func (t Transport) RoundTrip(r *http.Request) (*http.Response, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: doesn't dialer have a Timeout field?
|
// TODO: doesn't dialer have a Timeout field?
|
||||||
ctx := context.Background()
|
ctx := r.Context()
|
||||||
if t.DialTimeout > 0 {
|
if t.DialTimeout > 0 {
|
||||||
var cancel context.CancelFunc
|
var cancel context.CancelFunc
|
||||||
ctx, cancel = context.WithTimeout(ctx, time.Duration(t.DialTimeout))
|
ctx, cancel = context.WithTimeout(ctx, time.Duration(t.DialTimeout))
|
||||||
|
|
Loading…
Reference in a new issue