Skip to content

Commit ff2c4b7

Browse files
Jia Zhanbradfitz
Jia Zhan
authored andcommitted
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: a213978 GitHub-Pull-Request: #70 Reviewed-on: https://go-review.googlesource.com/c/net/+/230201 Reviewed-by: Brad Fitzpatrick <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent e086a09 commit ff2c4b7

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

http2/client_conn_pool.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,6 @@ func (c *addConnCall) run(t *Transport, key string, tc *tls.Conn) {
200200
close(c.done)
201201
}
202202

203-
func (p *clientConnPool) addConn(key string, cc *ClientConn) {
204-
p.mu.Lock()
205-
p.addConnLocked(key, cc)
206-
p.mu.Unlock()
207-
}
208-
209203
// p.mu must be held
210204
func (p *clientConnPool) addConnLocked(key string, cc *ClientConn) {
211205
for _, v := range p.conns[key] {

0 commit comments

Comments
 (0)