Summary#
- Move
http.Clientfrom per-call allocation incheckKnotReachabilityto a shared field onResyncer. http.Clientis safe for concurrent use and reusing it enables TCP connection pooling across reachability checks to the same knot.
http.Client from per-call allocation in checkKnotReachability to a shared field on Resyncer.http.Client is safe for concurrent use and reusing it enables TCP connection pooling across reachability checks to the same knot.Avoid allocating a new http.Client on every resyncRepo call.
http.Client is safe for concurrent use and reusing it enables
TCP connection pooling across checks to the same knot.
Signed-off-by: MatΓas Insaurralde <matias@insaurral.de>