--- a/src/java.net.http/share/classes/jdk/internal/net/http/common/SubscriberWrapper.java Wed Jun 20 16:01:16 2018 +0100
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/common/SubscriberWrapper.java Wed Jun 20 16:53:56 2018 +0100
@@ -260,6 +260,8 @@
try {
run1();
} catch (Throwable t) {
+ if (debug.on())
+ debug.log("DownstreamPusher threw: " + t);
errorCommon(t);
}
}
@@ -292,6 +294,7 @@
pushScheduler.stop();
outputQ.clear();
downstreamSubscriber.onError(error);
+ cf.completeExceptionally(error);
return;
}
@@ -383,9 +386,8 @@
(throwable = new AssertionError("null throwable")) != null;
if (errorRef.compareAndSet(null, throwable)) {
if (debug.on()) debug.log("error", throwable);
+ upstreamCompleted = true;
pushScheduler.runOrSchedule();
- upstreamCompleted = true;
- cf.completeExceptionally(throwable);
return true;
}
return false;