Remove old connection from pool on close (GetOneOf)
This commit is contained in:
parent
df867395ae
commit
ab3a8e2bcd
@ -67,6 +67,7 @@ func (p *pool) GetOneOf(ctx context.Context, peerIds []string) (peer.Peer, error
|
|||||||
default:
|
default:
|
||||||
return pr, nil
|
return pr, nil
|
||||||
}
|
}
|
||||||
|
_, _ = p.cache.Remove(ctx, peerId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// shuffle ids for better consistency
|
// shuffle ids for better consistency
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user