don't override DefaultClient

bug introduced by https://github.com/fluxcd/flagger/pull/872

Signed-off-by: Léopold Jacquot <leopold.jacquot@infomaniak.com>
This commit is contained in:
Léopold Jacquot
2021-06-24 15:04:41 +02:00
parent 8da8138f77
commit 6634f1a9ae
2 changed files with 2 additions and 5 deletions

View File

@@ -61,10 +61,7 @@ func callWebhook(webhook string, payload interface{}, timeout string) error {
ctx, cancel := context.WithTimeout(req.Context(), t)
defer cancel()
httpClient := http.DefaultClient
httpClient.Transport = http.DefaultTransport
r, err := httpClient.Do(req.WithContext(ctx))
r, err := http.DefaultClient.Do(req.WithContext(ctx))
if err != nil {
return err
}

View File

@@ -30,7 +30,7 @@ import (
)
func postMessage(address string, proxy string, payload interface{}) error {
httpClient := http.DefaultClient
var httpClient = &http.Client{}
if proxy != "" {
proxyURL, err := url.Parse(proxy)