Author: remm
Date: Thu Mar 15 15:20:26 2018
New Revision: 1826832

URL: http://svn.apache.org/viewvc?rev=1826832&view=rev
Log:
62177 for NIO2, as I suppose the sync didn't guarantee the ordered writing that 
is needed with push.

Modified:
    tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java

Modified: 
tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java?rev=1826832&r1=1826831&r2=1826832&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java 
(original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java Thu 
Mar 15 15:20:26 2018
@@ -164,12 +164,13 @@ public class Http2AsyncUpgradeHandler ex
             if (headerFrameBuffers != null) {
                 bufs = headerFrameBuffers.bufs.toArray(BYTEBUFFER_ARRAY);
             }
-        }
-        if (bufs != null) {
-            socketWrapper.write(BlockingMode.SEMI_BLOCK, 
protocol.getWriteTimeout(),
-                    TimeUnit.MILLISECONDS, null, 
SocketWrapperBase.COMPLETE_WRITE,
-                    applicationErrorCompletion, bufs);
-            handleAsyncException();
+            // FIXME: look again at more optimized syncs, remove due to the 
need to write header frames in order with push
+            if (bufs != null) {
+                socketWrapper.write(BlockingMode.SEMI_BLOCK, 
protocol.getWriteTimeout(),
+                        TimeUnit.MILLISECONDS, null, 
SocketWrapperBase.COMPLETE_WRITE,
+                        applicationErrorCompletion, bufs);
+                handleAsyncException();
+            }
         }
         if (endOfStream) {
             stream.sentEndOfStream();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to