src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java
branchhttp-client-branch
changeset 56071 3353cb42b1b4
parent 56008 bbd688c6fbbb
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java	Mon Feb 05 15:51:09 2018 +0000
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java	Mon Feb 05 17:18:26 2018 +0000
@@ -280,7 +280,8 @@
             throw new InternalError("onNext on inactive subscriber");
 
         synchronized (buffersLock) {
-            accumulatedBytes += Utils.accumulateBuffers(internalBuffers, item);
+            internalBuffers.addAll(item);
+            accumulatedBytes += remaining(item);
         }
 
         downstreamSubscription.pushDemanded();