mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-03-09 02:10:03 +00:00
PoolingAsyncClientConnectionManager incorrectly emits Ping commands to HTTP/1.1 endpoints #255
This commit is contained in:
parent
848abe93a7
commit
20266db737
@ -247,7 +247,7 @@ public void completed(final PoolEntry<HttpRoute, ManagedAsyncClientConnection> p
|
||||
if (TimeValue.isNonNegative(timeValue) && connection != null &&
|
||||
poolEntry.getUpdated() + timeValue.toMilliseconds() <= System.currentTimeMillis()) {
|
||||
final ProtocolVersion protocolVersion = connection.getProtocolVersion();
|
||||
if (HttpVersion.HTTP_2_0.greaterEquals(protocolVersion)) {
|
||||
if (protocolVersion != null && protocolVersion.greaterEquals(HttpVersion.HTTP_2_0)) {
|
||||
connection.submitCommand(new PingCommand(new BasicPingHandler(new Callback<Boolean>() {
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user