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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]