You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "dingshuangxi888 (via GitHub)" <gi...@apache.org> on 2023/06/07 07:46:21 UTC
[GitHub] [rocketmq] dingshuangxi888 commented on a diff in pull request #6867: [ISSUE #6866] Move the judgment logic of grpc TLS mode to improve the scalability of ProtocolNegotiator
dingshuangxi888 commented on code in PR #6867:
URL: https://github.com/apache/rocketmq/pull/6867#discussion_r1221075305
##########
proxy/src/main/java/org/apache/rocketmq/proxy/grpc/OptionalSSLProtocolNegotiator.java:
##########
@@ -50,45 +60,83 @@ public AsciiString scheme() {
}
@Override
- public ChannelHandler newHandler(GrpcHttp2ConnectionHandler grpcHttp2ConnectionHandler) {
- ChannelHandler plaintext =
- InternalProtocolNegotiators.serverPlaintext().newHandler(grpcHttp2ConnectionHandler);
- ChannelHandler ssl =
- InternalProtocolNegotiators.serverTls(sslContext).newHandler(grpcHttp2ConnectionHandler);
- return new PortUnificationServerHandler(ssl, plaintext);
+ public ChannelHandler newHandler(GrpcHttp2ConnectionHandler grpcHandler) {
+ return new PortUnificationServerHandler(grpcHandler);
}
@Override
public void close() {}
public static class PortUnificationServerHandler extends ByteToMessageDecoder {
+
private final ChannelHandler ssl;
private final ChannelHandler plaintext;
- public PortUnificationServerHandler(ChannelHandler ssl, ChannelHandler plaintext) {
- this.ssl = ssl;
- this.plaintext = plaintext;
+ public PortUnificationServerHandler(GrpcHttp2ConnectionHandler grpcHandler) {
+ this.ssl = InternalProtocolNegotiators.serverTls(loadSslContext())
Review Comment:
Yes, it has been fixed, please review again.
--
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: commits-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org