Hi,

Could you please review the following fix for JDK-8158980?
http://cr.openjdk.java.net/~skuksenko/jep110/8158980/webrev.00/

Fix solves the following issue: https://bugs.openjdk.java.net/browse/JDK-8158980

Stream will be never deleted from HTTP2Connection.streams in the following conditions:
1. "content-len" of sending data is zero. e.g. "GET" request.
 in that case "Stream.requestSent" will never be set to true.

2. "Stream.responseReceived" is never set to "true" when used following BodyProcessors (asByteArray, asByteArrayConsumer, asFile, asFileDownload, asString).

Removing Stream from HTTP2Connection requires both fields set to true, so failing normal setting only one of this fields causes memory leak.

The issue is easily reproduces - simple loop with GET request via HTTP/2 leads to OutOfMemoryError.

Reply via email to