Преглед изворни кода

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)