changeset 39143:ba4958d56eec

8158980: Memory leak in HTTP2Connection.streams Reviewed-by: chegar
author skuksenko
date Thu, 23 Jun 2016 10:25:04 +0100
parents bf48a9f13cf2
children 50f8aee9012d 52be16746607
files jdk/src/java.httpclient/share/classes/java/net/http/Stream.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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();