gorequest icon indicating copy to clipboard operation
gorequest copied to clipboard

How to reuse session.

Open sapamja opened this issue 8 years ago • 3 comments

Everytime when I do a post request, it creates new TCP connection. Looking at netstat this appears to be resulting in a new connection for every post, and it results to a large number of concurrent connections being open.

After that I tried s.Transport.DisableKeepAlives = false, it works for sequential POST request but not in goroutine.

What is the correct way to reuse connections in this case?

sapamja avatar Dec 19 '16 00:12 sapamja