()
| 323 | } |
| 324 | |
| 325 | func (p *connPool) unref() { |
| 326 | if atomic.AddUintptr(&p.refc, ^uintptr(0)) == 0 { |
| 327 | p.mutex.Lock() |
| 328 | defer p.mutex.Unlock() |
| 329 | |
| 330 | for _, conns := range p.conns { |
| 331 | conns.closeIdleConns() |
| 332 | } |
| 333 | |
| 334 | p.ctrl.closeIdleConns() |
| 335 | p.cancel() |
| 336 | } |
| 337 | } |
| 338 | |
| 339 | func (p *connPool) roundTrip(ctx context.Context, req Request) (Response, error) { |
| 340 | // This first select should never block after the first metadata response |
no test coverage detected