You should not change the Transport.TLSClientFactory while the transport
is being used. Doing that is likely to cause data races.
An alternative strategy could be to set the global oohttp.TLSClientFactory
field, which will cause all connections to use such a factory. If you
choose to override the global factory (as opposed to the per-Transport one), you
should do this only once before calling any HTTP code. Changing the global
factory while HTTP code is running causes data races.