Skip to content

Commit

Permalink
transport: pool, stop shard refill faster when context is done
Browse files Browse the repository at this point in the history
Fixes #291
  • Loading branch information
Kulezi committed Sep 23, 2022
1 parent 31b0e68 commit 76b095d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion transport/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ func (r *PoolRefiller) fill(ctx context.Context) {
if r.pool.loadConn(i) != nil {
continue
}

if ctx.Err() != nil {
return
}
si.Shard = uint16(i)
span := startSpan()
conn, err := OpenShardConn(ctx, r.addr, si, r.cfg)
Expand Down

0 comments on commit 76b095d

Please sign in to comment.