tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r1827419 - /tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java
Date Wed, 21 Mar 2018 16:12:24 GMT
Author: remm
Date: Wed Mar 21 16:12:23 2018
New Revision: 1827419

URL: http://svn.apache.org/viewvc?rev=1827419&view=rev
Log:
No actual change but a cleanup as I've given up on something "better" for now.

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=1827419&r1=1827418&r2=1827419&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java (original)
+++ tomcat/trunk/java/org/apache/coyote/http2/Http2AsyncUpgradeHandler.java Wed Mar 21 16:12:23
2018
@@ -157,18 +157,13 @@ public class Http2AsyncUpgradeHandler ex
     void writeHeaders(Stream stream, int pushedStreamId, MimeHeaders mimeHeaders,
             boolean endOfStream, int payloadSize) throws IOException {
         // This ensures the Stream processing thread has control of the socket.
-        ByteBuffer[] bufs = null;
         synchronized (socketWrapper) {
             AsyncHeaderFrameBuffers headerFrameBuffers = (AsyncHeaderFrameBuffers)
                     doWriteHeaders(stream, pushedStreamId, mimeHeaders, endOfStream, payloadSize);
             if (headerFrameBuffers != null) {
-                bufs = headerFrameBuffers.bufs.toArray(BYTEBUFFER_ARRAY);
-            }
-            // 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);
+                        applicationErrorCompletion, headerFrameBuffers.bufs.toArray(BYTEBUFFER_ARRAY));
                 handleAsyncException();
             }
         }



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


Mime
View raw message