Skip to content

Commit 4a0f258

Browse files
zhanxuefengzhanxuefeng
authored andcommitted
[ISSUE #4273] NettyRemotingClient get tls conf from system properties
1 parent 446b76b commit 4a0f258

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

remoting/src/main/java/org/apache/rocketmq/remoting/netty/NettyRemotingClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public Thread newThread(Runnable r) {
129129
}
130130
});
131131

132-
if (nettyClientConfig.isUseTLS()) {
132+
if (nettyClientConfig.isUseTLS() || TlsSystemConfig.tlsEnable) {
133133
try {
134134
sslContext = TlsHelper.buildSslContext(true);
135135
log.info("SSL enabled for client");
@@ -170,7 +170,7 @@ public Thread newThread(Runnable r) {
170170
@Override
171171
public void initChannel(SocketChannel ch) throws Exception {
172172
ChannelPipeline pipeline = ch.pipeline();
173-
if (nettyClientConfig.isUseTLS()) {
173+
if (nettyClientConfig.isUseTLS() || TlsSystemConfig.tlsEnable) {
174174
if (null != sslContext) {
175175
pipeline.addFirst(defaultEventExecutorGroup, "sslHandler", sslContext.newHandler(ch.alloc()));
176176
log.info("Prepend SSL handler");

0 commit comments

Comments
 (0)