Skip to content

Commit 1e9dd38

Browse files
committed
Don't wrap ExecutionException again when completing a CompletableFuture, close AsyncHttpClient#1163
1 parent 5a8bb5a commit 1e9dd38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public CompletableFuture<V> toCompletableFuture() {
266266
public void run() {
267267
ExecutionException e = EX_EX_UPDATER.get(NettyResponseFuture.this);
268268
if (e != null)
269-
completable.completeExceptionally(e);
269+
completable.completeExceptionally(e.getCause());
270270
else
271271
completable.complete((V) CONTENT_UPDATER.get(NettyResponseFuture.this));
272272
}

0 commit comments

Comments
 (0)