Let's merge this after @bbangert's router refactor...
Expose IdleConns as a config setting for Router and GCMPing.
Ensure Router.notifyContact() discards the response body. If the body is closed but not consumed, the underlying TCP connection will not be reused. Other uses of http.Client do this already.
Replace SetDeadline with http.Client.Timeout. SetDeadline caused persistent connections to expire after Router.rwtimeout, forcing the client to open new ones.
Let's merge this after @bbangert's router refactor...
IdleConns
as a config setting forRouter
andGCMPing
.Router.notifyContact()
discards the response body. If the body is closed but not consumed, the underlying TCP connection will not be reused. Other uses ofhttp.Client
do this already.SetDeadline
withhttp.Client.Timeout
.SetDeadline
caused persistent connections to expire afterRouter.rwtimeout
, forcing the client to open new ones.@bbangert r?