title: Is it safe to modify golang Http Transport while requests are in flight?
body: <p>I have an application which rotates through proxies on a per request basis.</p>
  
  <p>Currently I have some code which is:</p>
  
  <pre><code>func (mon *Monitor) MassUrlRetrieve(n int, url string) (respBytes []byte) {
      funnel := make(chan []byte)
      go ProductRetrieveTimeout(TIMEOUT_RETRIEVE_URL, funnel)
      for i := 0; i &lt; n; i++ {
          go mon.WrapGetUrlToChannel(funnel, url)
      }
      return &lt;- funnel
  }
  </code></pre>
  
  <p>which basically sends off multiple requests and returns the first one to respond/ timeout if none respond in a timely manner.</p>
  
  <p>In <code>WrapGetUrlToChannel</code> I create a new proxy url are assign it to <code>mon</code>'s <code>client.tr.Proxy</code>.</p>
  
  <p>My question is - is it safe to modify the transport of the client while requests are in flight? Or to be safe should I have a different transport and client for each proxy to make sure they do not interfere?</p>