Re: [go-nuts] Re: http.NewRequest stopped to check SSL certificate validity every time

2016-11-19 Thread James Bardin
On Sat, Nov 19, 2016 at 11:33 AM, Vasily Korytov wrote: > It stays there for days, so I'm not sure. And the client is supposed to be > created and destroyed in a function that terminates, so I'm really > surprised by that. > > The connection can stay there for as long as the server and client wan

[go-nuts] Re: http.NewRequest stopped to check SSL certificate validity every time

2016-11-19 Thread Vasily Korytov
On Saturday, November 19, 2016 at 6:21:49 PM UTC+2, James Bardin wrote: > > > Chances are that you're getting better reuse of the client connections. If > you want to ensure that you reconnect periodically use Request.Close when > you don't want the connection maintained, or call > Transport.C

[go-nuts] Re: http.NewRequest stopped to check SSL certificate validity every time

2016-11-19 Thread James Bardin
Chances are that you're getting better reuse of the client connections. If you want to ensure that you reconnect periodically use Request.Close when you don't want the connection maintained, or call Transport.CloseIdleConnections occasionally between requests to force the connections to close.

[go-nuts] Re: http.NewRequest stopped to check SSL certificate validity every time

2016-11-19 Thread Vasily Korytov
P.S. I would like to line out things that changed since the SSL certificate check was working: 1. Newer Go runtime 2. HTTP/2 connection 3. I used http.Get(url) before and now I use http.Client.Do (I use this for customizing the User-Agent header) All the other things did not change, so the chan