Skip to content

Commit cbe0685

Browse files
joedjslandelle
authored andcommitted
Set NettyResponseFuture#isDone before invoking abort callbacks, close AsyncHttpClient#1368 (AsyncHttpClient#1370)
1 parent cda5ac5 commit cbe0685

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/src/main/java/org/asynchttpclient/netty/NettyResponseFuture.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,11 @@ public final void done() {
237237

238238
public final void abort(final Throwable t) {
239239

240-
future.completeExceptionally(t);
241-
242240
if (terminateAndExit())
243241
return;
244242

243+
future.completeExceptionally(t);
244+
245245
if (onThrowableCalledField.compareAndSet(this, 0, 1)) {
246246
try {
247247
asyncHandler.onThrowable(t);

0 commit comments

Comments
 (0)