title: Panic in Golang http.Client with high concurrent excecutions
body: <p>I am creating a system which is a http server in golang that will perform several request to another API based in every request that come to it.</p>
  
  <p>e.g</p>
  
  <pre><code>curl localhost:8080/users?ids=1,2,3,4
  </code></pre>
  
  <p>will perform several concurrent gets to:</p>
  
  <pre><code>api.com/user/1
  
  api.com/user/2
  
  api.com/user/3
  
  api.com/user/4
  </code></pre>
  
  <p>I am having a problem, the http.Client is getting my a panic, when it has a heavy concurrent requests (if I hit localhost:8080/users?ids=1,2,3,4.....40 with AB with 4 concurrent, or hitting refresh in my browser)</p>
  
  <p>The proglem appears to be with the sentence (line 159)</p>
  
  <pre><code>resp, _ := client.Do(req)
  </code></pre>
  
  <p>My code is here (Not so large... 180 lines):
  <a href="http://play.golang.org/p/olibNz2n1Z" rel="nofollow">http://play.golang.org/p/olibNz2n1Z</a></p>
  
  <p>The panic error is this one:</p>
  
  <pre><code>goroutine 5 [select]:
  net/http.(*persistConn).roundTrip(0xc210058f80, 0xc21000a720, 0xc210058f80, 0x0, 0x0)
      /usr/local/go/src/pkg/net/http/transport.go:879 +0x6d6
  net/http.(*Transport).RoundTrip(0xc210058280, 0xc21005b1a0, 0x1, 0x0, 0x0)
      /usr/local/go/src/pkg/net/http/transport.go:187 +0x391
  net/http.send(0xc21005b1a0, 0x590290, 0xc210058280, 0x0, 0x0, ...)
      /usr/local/go/src/pkg/net/http/client.go:168 +0x37f
  net/http.(*Client).send(0xc21001e960, 0xc21005b1a0, 0x28, 0xc21001ec30, 0xc21005f570)
      /usr/local/go/src/pkg/net/http/client.go:100 +0xd9
  net/http.(*Client).doFollowingRedirects(0xc21001e960, 0xc21005b1a0, 0x2ab298, 0x0, 0x0, ...)
      /usr/local/go/src/pkg/net/http/client.go:294 +0x671
  net/http.(*Client).Do(0xc21001e960, 0xc21005b1a0, 0xa, 0x0, 0x0)
      /usr/local/go/src/pkg/net/http/client.go:129 +0x8f
  main.buscarRecurso(0xc21000a650, 0xb, 0xc2100526c0)
      /Users/fscasserra/Documents/workspace/Luna/multiget-api/multiget.go:159 +0x131
  created by main.obtenerRecursos
      /Users/fscasserra/Documents/workspace/Luna/multiget-api/multiget.go:106 +0x197
  </code></pre>
  
  <p>Can anyone help me?</p>
  
  <p>Best regards,
  Fer</p>