Skip to content

Commit

Permalink
fix npe when onCompleteFailure happens after reset (#12199)
Browse files Browse the repository at this point in the history
Fix npe when onCompleteFailure happens after reset

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
  • Loading branch information
lorban committed Aug 28, 2024
1 parent aa07995 commit ed1cadc
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,11 @@ private void externalAbort(Throwable failure, Promise<Boolean> promise)
}
}

private void internalAbort(HttpExchange exchange, Throwable failure)
private void internalAbort(Throwable failure)
{
HttpExchange exchange = getHttpExchange();
if (exchange == null)
return;
anyToFailure(failure);
abortRequest(exchange);
}
Expand Down Expand Up @@ -626,7 +629,7 @@ protected void onCompleteFailure(Throwable x)
}

failRequest(x);
internalAbort(exchange, x);
internalAbort(x);

Promise<Boolean> promise = abort;
if (promise != null)
Expand Down

0 comments on commit ed1cadc

Please sign in to comment.