You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2022/06/23 12:05:05 UTC
[GitHub] [httpcomponents-core] ok2c commented on a diff in pull request #351: HTTPCLIENT-2222: fixed ProtocolNegotiationException
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: dev-unsubscribe@hc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org