oxsean commented on code in PR #15436:
URL: https://github.com/apache/dubbo/pull/15436#discussion_r2135148179
##########
dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyConnectionClient.java:
##########
@@ -97,6 +121,48 @@ protected void initChannel(SocketChannel ch) {
@Override
protected ChannelFuture performConnect() {
+ if (connectionPrefaceReceivedPromiseRef != null) {
+ connectionPrefaceReceivedPromiseRef.compareAndSet(null, new
DefaultPromise<>(GlobalEventExecutor.INSTANCE));
+ }
return bootstrap.connect();
}
+
+ @Override
+ protected void doConnect() throws RemotingException {
+ long start = System.currentTimeMillis();
+ super.doConnect();
+ if (connectionPrefaceReceivedPromiseRef == null) {
Review Comment:
Please extract this logic into a separate method, and in the comment,
reference
[RFC7540#section-3.5](https://datatracker.ietf.org/doc/html/rfc7540#section-3.5)
to explain why we need this.
--
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]