Forráskód Böngészése

http2: remove unused addConn

`addConn` is dead code that's not used any more.

`addConnLocked` is used when a new connection
needs to be added to the connection pool, and the callers
always manage the lock.

Change-Id: I27d4a402e243a34f8ad707645738953764e05eb3
GitHub-Last-Rev: a213978a8553bee95d60d31ca00e7f784d55ecd9
GitHub-Pull-Request: golang/net#70
Reviewed-on: https://go-review.googlesource.com/c/net/+/230201
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Jia Zhan 5 éve
szülő
commit
ff2c4b7c35
1 módosított fájl, 0 hozzáadás és 6 törlés
  1. 0 6
      http2/client_conn_pool.go

+ 0 - 6
http2/client_conn_pool.go

@@ -200,12 +200,6 @@ func (c *addConnCall) run(t *Transport, key string, tc *tls.Conn) {
 	close(c.done)
 }
 
-func (p *clientConnPool) addConn(key string, cc *ClientConn) {
-	p.mu.Lock()
-	p.addConnLocked(key, cc)
-	p.mu.Unlock()
-}
-
 // p.mu must be held
 func (p *clientConnPool) addConnLocked(key string, cc *ClientConn) {
 	for _, v := range p.conns[key] {