8158980: Memory leak in HTTP2Connection.streams
authorskuksenko
Thu, 23 Jun 2016 10:25:04 +0100
changeset 39143 ba4958d56eec
parent 39142 bf48a9f13cf2
child 39144 50f8aee9012d
child 39145 52be16746607
8158980: Memory leak in HTTP2Connection.streams Reviewed-by: chegar
jdk/src/java.httpclient/share/classes/java/net/http/Stream.java
--- a/jdk/src/java.httpclient/share/classes/java/net/http/Stream.java	Wed Jun 22 15:58:08 2016 -0700
+++ b/jdk/src/java.httpclient/share/classes/java/net/http/Stream.java	Thu Jun 23 10:25:04 2016 +0100
@@ -617,6 +617,7 @@
     void sendBodyImpl() throws IOException, InterruptedException {
         if (requestContentLen == 0) {
             // no body
+            requestSent();
             return;
         }
         DataFrame df;
@@ -667,7 +668,7 @@
                     responseFlowController); // TODO: filter headers
         if (body == null) {
             receiveData();
-            return processor.onResponseComplete();
+            body = processor.onResponseComplete();
         } else
             receiveDataAsync(processor);
         responseReceived();