Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: AlexStocks <alexstocks@foxmail.com>
  • Loading branch information
AlexStocks committed Feb 9, 2020
1 parent 5b13a70 commit 65e436f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions protocol/dubbo/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,13 @@ func (p *gettyRPCClientPool) release(conn *gettyRPCClient, err error) {
return
}

// check whether @conn has existed in p.conns or not.
for i := range p.conns {
if p.conns[i] == conn {
return
}
}

if len(p.conns) >= p.size {
// delete @conn from client pool
p.remove(conn)
Expand Down

0 comments on commit 65e436f

Please sign in to comment.