mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 19:57:43 +00:00
setup timeouts on reddit http client
This commit is contained in:
parent
547ab64c20
commit
102cbb2ee2
1 changed files with 4 additions and 11 deletions
|
@ -88,17 +88,10 @@ func NewClient(id, secret string, statsd statsd.ClientInterface, redis *redis.Cl
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
t := http.DefaultTransport.(*http.Transport).Clone()
|
t := http.DefaultTransport.(*http.Transport).Clone()
|
||||||
t.MaxIdleConns = connLimit / 4 / 100
|
|
||||||
t.MaxConnsPerHost = connLimit / 100
|
|
||||||
t.MaxIdleConnsPerHost = connLimit / 4 / 100
|
|
||||||
t.IdleConnTimeout = 60 * time.Second
|
t.IdleConnTimeout = 60 * time.Second
|
||||||
t.ResponseHeaderTimeout = 5 * time.Second
|
t.ResponseHeaderTimeout = 5 * time.Second
|
||||||
|
|
||||||
client := &http.Client{Transport: t}
|
client := &http.Client{Transport: t}
|
||||||
*/
|
|
||||||
client := &http.Client{}
|
|
||||||
|
|
||||||
pool := &fastjson.ParserPool{}
|
pool := &fastjson.ParserPool{}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue