Skip to content

Commit ed1cadc

Browse files
authored
fix npe when onCompleteFailure happens after reset (#12199)
Fix npe when onCompleteFailure happens after reset Signed-off-by: Ludovic Orban <[email protected]>
1 parent aa07995 commit ed1cadc

File tree

1 file changed

+5
-2
lines changed
  • jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport

1 file changed

+5
-2
lines changed

jetty-core/jetty-client/src/main/java/org/eclipse/jetty/client/transport/HttpSender.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,11 @@ private void externalAbort(Throwable failure, Promise<Boolean> promise)
386386
}
387387
}
388388

389-
private void internalAbort(HttpExchange exchange, Throwable failure)
389+
private void internalAbort(Throwable failure)
390390
{
391+
HttpExchange exchange = getHttpExchange();
392+
if (exchange == null)
393+
return;
391394
anyToFailure(failure);
392395
abortRequest(exchange);
393396
}
@@ -626,7 +629,7 @@ protected void onCompleteFailure(Throwable x)
626629
}
627630

628631
failRequest(x);
629-
internalAbort(exchange, x);
632+
internalAbort(x);
630633

631634
Promise<Boolean> promise = abort;
632635
if (promise != null)

0 commit comments

Comments
 (0)