From 35c33620a59608226ecb4a1f275c31e0b39d4682 Mon Sep 17 00:00:00 2001 From: TwinProduction Date: Fri, 18 Jun 2021 10:07:55 -0400 Subject: [PATCH] Remove hidden feature HTTP_CLIENT_TIMEOUT_IN_SECONDS --- client/client.go | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/client/client.go b/client/client.go index 13aa559d..027e0853 100644 --- a/client/client.go +++ b/client/client.go @@ -7,8 +7,6 @@ import ( "net" "net/http" "net/smtp" - "os" - "strconv" "strings" "time" @@ -27,16 +25,6 @@ var ( httpTimeout = 10 * time.Second ) -func init() { - // XXX: This is an undocumented feature. See https://github.com/TwinProduction/gatus/issues/104. - httpTimeoutInSecondsFromEnvironmentVariable := os.Getenv("HTTP_CLIENT_TIMEOUT_IN_SECONDS") - if len(httpTimeoutInSecondsFromEnvironmentVariable) > 0 { - if httpTimeoutInSeconds, err := strconv.Atoi(httpTimeoutInSecondsFromEnvironmentVariable); err == nil { - httpTimeout = time.Duration(httpTimeoutInSeconds) * time.Second - } - } -} - // GetHTTPClient returns the shared HTTP client func GetHTTPClient(insecure bool) *http.Client { if insecure {