This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 317480b Refine fix for apparent end of stream concurrency with async 317480b is described below commit 317480b90546a69bdf661e747cb89dda8727d462 Author: remm <r...@apache.org> AuthorDate: Fri May 24 00:33:42 2019 +0200 Refine fix for apparent end of stream concurrency with async Needs testing. --- java/org/apache/coyote/http2/Http2AsyncParser.java | 7 +++---- webapps/docs/changelog.xml | 3 +++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/java/org/apache/coyote/http2/Http2AsyncParser.java b/java/org/apache/coyote/http2/Http2AsyncParser.java index 84342a4..ba3ec3a 100644 --- a/java/org/apache/coyote/http2/Http2AsyncParser.java +++ b/java/org/apache/coyote/http2/Http2AsyncParser.java @@ -240,14 +240,14 @@ class Http2AsyncParser extends Http2Parser { if (streamException) { swallow(streamId, payloadSize, false, payload); } else { - // TODO: Find why this sync is needed - synchronized (input) { switch (frameType) { case DATA: readDataFrame(streamId, flags, payloadSize, payload); break; case HEADERS: - readHeadersFrame(streamId, flags, payloadSize, payload); + synchronized (upgradeHandler) { + readHeadersFrame(streamId, flags, payloadSize, payload); + } break; case PRIORITY: readPriorityFrame(streamId, payload); @@ -276,7 +276,6 @@ class Http2AsyncParser extends Http2Parser { case UNKNOWN: readUnknownFrame(streamId, frameType, flags, payloadSize, payload); } - } } // See if there is a new 9 byte header and continue parsing if possible if (payload.remaining() >= 9) { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 3155c8c..a6979de 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -152,6 +152,9 @@ Drop legacy NIO double socket close (close channel, then close socket). (remm) </fix> + <fix> + Fix HTTP/2 end of stream concurrency with async. (remm) + </fix> </changelog> </subsection> <subsection name="Cluster"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org