Viktor Sokolov пре 3 месеци
родитељ
комит
7d98ce6c3a
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      env/parsers.go
  2. 1 1
      fetcher/transport/generichttp/generic_http.go

+ 1 - 1
env/parsers.go

@@ -72,7 +72,7 @@ func duration(d *time.Duration, desc Desc, resolution time.Duration) error {
 	if err != nil {
 		return desc.ErrorParse(err)
 	}
-	*d = time.Duration(value) * time.Second
+	*d = time.Duration(value) * resolution
 
 	return nil
 }

+ 1 - 1
fetcher/transport/generichttp/generic_http.go

@@ -34,7 +34,7 @@ func New(verifyNetworks bool, config *Config) (*http.Transport, error) {
 		DialContext:           dialer.DialContext,
 		MaxIdleConns:          100,
 		MaxIdleConnsPerHost:   100,
-		IdleConnTimeout:       time.Duration(config.ClientKeepAliveTimeout) * time.Second,
+		IdleConnTimeout:       config.ClientKeepAliveTimeout,
 		TLSHandshakeTimeout:   10 * time.Second,
 		ExpectContinueTimeout: 1 * time.Second,
 		ForceAttemptHTTP2:     false,