Answer the question
In order to leave comments, you need to log in
Error with a large number of outgoing HTTPS requests?
Error #1: TLS: Handshake timeout
Error #2: write: broken pipe
About 20k concurrent connections are being made
var HTTPClient = http.Client{
Timeout: time.Duration(45 * time.Second),
}
func RequestLongPoll(url string) []byte {
httpResponse, err := HTTPClient.Get(url)
if err != nil || httpResponse == nil {
fmt.Println(err.Error())
return nil
}
defer httpResponse.Body.Close()
bodyBuffer, err := ioutil.ReadAll(httpResponse.Body)
if err != nil || bodyBuffer == nil {
fmt.Println(err.Error())
return nil
}
return bodyBuffer
}
Answer the question
In order to leave comments, you need to log in
https://stackoverflow.com/questions/32523521/golan...
here is a way to increase TLSHandshakeTimeout
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question