Fix NPE for null HttpContext in minimal async clients
This commit is contained in:
parent
99f7d2b710
commit
ffa0530bb2
|
@ -136,7 +136,7 @@ public final class MinimalH2AsyncClient extends AbstractMinimalHttpAsyncClientBa
|
|||
final HttpContext context) {
|
||||
ensureRunning();
|
||||
final ComplexCancellable cancellable = new ComplexCancellable();
|
||||
final HttpClientContext clientContext = HttpClientContext.adapt(context);
|
||||
final HttpClientContext clientContext = context != null ? HttpClientContext.adapt(context) : HttpClientContext.create();
|
||||
try {
|
||||
exchangeHandler.produceRequest(new RequestChannel() {
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ public final class MinimalHttpAsyncClient extends AbstractMinimalHttpAsyncClient
|
|||
final HttpContext context) {
|
||||
ensureRunning();
|
||||
final ComplexCancellable cancellable = new ComplexCancellable();
|
||||
final HttpClientContext clientContext = HttpClientContext.adapt(context);
|
||||
final HttpClientContext clientContext = context != null ? HttpClientContext.adapt(context) : HttpClientContext.create();
|
||||
try {
|
||||
exchangeHandler.produceRequest(new RequestChannel() {
|
||||
|
||||
|
|
Loading…
Reference in New Issue