8315708: Enhance HTTP/2 client usage

Reviewed-by: rhalade, michaelm, dfuchs
This commit is contained in:
Daniel Jeliński 2023-10-23 06:48:34 +00:00 committed by Jaikiran Pai
parent 31a1f9c493
commit 2885469c4b

View File

@ -108,14 +108,10 @@ final class ConnectionPool {
return false;
}
if (secure && destination != null) {
if (destination.getHostName() != null) {
if (!destination.getHostName().equalsIgnoreCase(
other.destination.getHostName())) {
return false;
}
} else {
if (other.destination.getHostName() != null)
return false;
String hostString = destination.getHostString();
if (hostString == null || !hostString.equalsIgnoreCase(
other.destination.getHostString())) {
return false;
}
}
return true;