Skip to content

Commit

Permalink
Update internal/net/grpc/pool/pool.go
Browse files Browse the repository at this point in the history
  • Loading branch information
kevindiu authored Nov 21, 2022
1 parent e5ab473 commit 6b68077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/net/grpc/pool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ func (p *pool) Get() (*ClientConn, bool) {
return nil, false
}

for i := 0; i < int(l)+1; i++ {
for i := 0; i < int(l); i++ {
if res := p.pool[atomic.AddUint64(&p.current, 1)%p.Len()].Load(); res != nil {
if pc, ok := res.(*poolConn); ok && pc != nil && isHealthy(pc.conn) {
return pc.conn, true
Expand Down

0 comments on commit 6b68077

Please sign in to comment.