Skip to content

Commit

Permalink
new defaults for upstream timeouts and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmittag committed Apr 8, 2022
1 parent 27f507c commit 2c91e59
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func (config Config) setDefaultUpstreamParams() *Config {
config.Connection.Upstream.ReadTimeoutSeconds = 10
}
if config.Connection.Upstream.IdleTimeoutSeconds == 0 {
config.Connection.Upstream.IdleTimeoutSeconds = 5
config.Connection.Upstream.IdleTimeoutSeconds = 120
}
if config.Connection.Upstream.PoolSize == 0 {
config.Connection.Upstream.PoolSize = 32768
Expand Down
2 changes: 1 addition & 1 deletion config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func TestDefaultUpstreamSocketTimeout(t *testing.T) {
func TestDefaultUpstreamReadTimeout(t *testing.T) {
config := new(Config).setDefaultUpstreamParams()
got := config.Connection.Upstream.ReadTimeoutSeconds
want := 120
want := 10
if got != want {
t.Errorf("default config got %d, want %d", got, want)
}
Expand Down

0 comments on commit 2c91e59

Please sign in to comment.