fix npe when onCompleteFailure happens after reset (#12199)

Fix npe when onCompleteFailure happens after reset

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2024-08-28 19:43:54 +02:00 committed by GitHub
parent aa07995f37
commit ed1cadc449
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -386,8 +386,11 @@ public abstract class HttpSender
}
}
private void internalAbort(HttpExchange exchange, Throwable failure)
private void internalAbort(Throwable failure)
{
HttpExchange exchange = getHttpExchange();
if (exchange == null)
return;
anyToFailure(failure);
abortRequest(exchange);
}
@ -626,7 +629,7 @@ public abstract class HttpSender
}
failRequest(x);
internalAbort(exchange, x);
internalAbort(x);
Promise<Boolean> promise = abort;
if (promise != null)