ok2c commented on code in PR #351:
URL: 
https://github.com/apache/httpcomponents-core/pull/351#discussion_r904936239


##########
httpcore5-h2/src/main/java/org/apache/hc/core5/http2/impl/nio/H2OnlyClientProtocolNegotiator.java:
##########
@@ -104,7 +106,8 @@ private void writeOutPreface(final IOSession session) 
throws IOException  {
         }
         if (!preface.hasRemaining()) {
             session.clearEvent(SelectionKey.OP_WRITE);
-            startProtocol(HttpVersion.HTTP_2, new 
ClientH2IOEventHandler(http2StreamHandlerFactory.create(ioSession)), null);
+            final ByteBuffer data = inBuf != null ? inBuf.data() : null;

Review Comment:
   @carterkozak `IOEventHandler`s can be called by a single I/O event dispatch 
thread at a time by design and therefore do not need to synchronize access to 
their internal structures if they do not delegate event handling to external 
handlers. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to