Переглянути джерело

fix(http): create new http.Client instead of mutating default

ayn2op 1 місяць тому
батько
коміт
69d3f81c89
1 змінених файлів з 1 додано та 1 видалено
  1. 1 1
      internal/http/client.go

+ 1 - 1
internal/http/client.go

@@ -9,7 +9,7 @@ import (
 )
 
 func NewClient(token string) *api.Client {
-	stdClient := http.DefaultClient
+	stdClient := new(http.Client)
 	stdClient.Transport = NewTransport()
 	httpClient := httputil.NewClientWithDriver(httpdriver.WrapClient(*stdClient))
 	apiClient := api.NewCustomClient(token, httpClient)