From df6a34f5af82b10a60ac626973a103df13f59348 Mon Sep 17 00:00:00 2001 From: c9s Date: Fri, 9 Dec 2022 21:30:33 +0800 Subject: [PATCH] binanceapi: adjust http timeout to 10s --- pkg/exchange/binance/binanceapi/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/exchange/binance/binanceapi/client.go b/pkg/exchange/binance/binanceapi/client.go index a587cf7480..0157131294 100644 --- a/pkg/exchange/binance/binanceapi/client.go +++ b/pkg/exchange/binance/binanceapi/client.go @@ -21,7 +21,7 @@ import ( "github.com/c9s/bbgo/pkg/types" ) -const defaultHTTPTimeout = time.Second * 2 +const defaultHTTPTimeout = time.Second * 10 const RestBaseURL = "https://api.binance.com" const SandboxRestBaseURL = "https://testnet.binance.vision" const DebugRequestResponse = false @@ -37,7 +37,7 @@ var defaultTransport = &http.Transport{ MaxIdleConns: 100, MaxConnsPerHost: 100, MaxIdleConnsPerHost: 100, - //TLSNextProto: make(map[string]func(string, *tls.Conn) http.RoundTripper), + // TLSNextProto: make(map[string]func(string, *tls.Conn) http.RoundTripper), ExpectContinueTimeout: 0, ForceAttemptHTTP2: true, TLSClientConfig: &tls.Config{},