Use generic backend-error-redesign feature flag instead of http-timeouts

An individual flag for each change of the backend error handling would
be too finegrained. Thus, add a generic flag.
This commit is contained in:
Michael Eischer
2024-05-11 20:22:10 +02:00
parent 4740528a0b
commit bf8cc59889
2 changed files with 4 additions and 4 deletions

View File

@@ -89,7 +89,7 @@ func Transport(opts TransportOptions) (http.RoundTripper, error) {
if err != nil {
panic(err)
}
if feature.Flag.Enabled(feature.HTTPTimeouts) {
if feature.Flag.Enabled(feature.BackendErrorRedesign) {
h2.WriteByteTimeout = 120 * time.Second
h2.ReadIdleTimeout = 60 * time.Second
h2.PingTimeout = 60 * time.Second
@@ -132,7 +132,7 @@ func Transport(opts TransportOptions) (http.RoundTripper, error) {
}
rt := http.RoundTripper(tr)
if feature.Flag.Enabled(feature.HTTPTimeouts) {
if feature.Flag.Enabled(feature.BackendErrorRedesign) {
rt = newWatchdogRoundtripper(rt, 120*time.Second, 128*1024)
}