mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-09 03:25:28 +00:00
H2 async runtime to proactively set HTTP/2 protocol version in the execution context
This commit is contained in:
parent
3fe6a8bcdf
commit
ed7701c509
@ -40,6 +40,7 @@
|
||||
import org.apache.hc.core5.concurrent.ComplexCancellable;
|
||||
import org.apache.hc.core5.concurrent.FutureCallback;
|
||||
import org.apache.hc.core5.http.HttpHost;
|
||||
import org.apache.hc.core5.http.HttpVersion;
|
||||
import org.apache.hc.core5.http.nio.AsyncClientExchangeHandler;
|
||||
import org.apache.hc.core5.http.nio.AsyncPushConsumer;
|
||||
import org.apache.hc.core5.http.nio.HandlerFactory;
|
||||
@ -101,6 +102,7 @@ public void completed(final IOSession ioSession) {
|
||||
if (log.isDebugEnabled()) {
|
||||
log.debug("{} acquired endpoint", id);
|
||||
}
|
||||
context.setProtocolVersion(HttpVersion.HTTP_2);
|
||||
callback.completed(InternalH2AsyncExecRuntime.this);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user