Skip to content

Commit

Permalink
don't override DefaultClient
Browse files Browse the repository at this point in the history
bug introduced by fluxcd#872

Signed-off-by: Léopold Jacquot <[email protected]>
  • Loading branch information
L3o-pold committed Jun 24, 2021
1 parent 8da8138 commit 6634f1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions pkg/controller/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/notifier/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6634f1a

Please sign in to comment.