diff --git a/servicetalk-http-utils/src/main/java/io/servicetalk/http/utils/RedirectSingle.java b/servicetalk-http-utils/src/main/java/io/servicetalk/http/utils/RedirectSingle.java index 7358f529b5..01232b0310 100644 --- a/servicetalk-http-utils/src/main/java/io/servicetalk/http/utils/RedirectSingle.java +++ b/servicetalk-http-utils/src/main/java/io/servicetalk/http/utils/RedirectSingle.java @@ -194,8 +194,8 @@ public void onSuccess(@Nullable final StreamingHttpResponse response) { if (!terminalDelivered) { // Drain response payload body before propagating the cause sequentialCancellable.nextCancellable(response.messageBody().ignoreElements() - .whenOnError(suppressed -> safeOnError(target, addSuppressed(cause, suppressed))) - .subscribe(() -> safeOnError(target, cause))); + .subscribe(() -> safeOnError(target, cause), + suppressed -> safeOnError(target, addSuppressed(cause, suppressed)))); } else { LOGGER.info("Ignoring exception from onSuccess of Subscriber {}.", target, cause); }