Skip to content
Snippets Groups Projects
Commit 65e436fe authored by AlexStocks's avatar AlexStocks
Browse files
parent 5b13a701
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment