Remove old connection from pool on close (GetOneOf)

This commit is contained in:
mcrakhman 2023-03-13 17:18:21 +01:00
parent 1a01f361ad
commit e568f899aa
No known key found for this signature in database
GPG Key ID: DED12CFEF5B8396B

View File

@ -67,6 +67,7 @@ func (p *pool) GetOneOf(ctx context.Context, peerIds []string) (peer.Peer, error
default:
return pr, nil
}
_, _ = p.cache.Remove(ctx, peerId)
}
}
// shuffle ids for better consistency