提交 dd2339bd 编写于 作者: Y yukon

Add log when reload the ssl context

上级 a25d38c4
...@@ -406,6 +406,7 @@ public class BrokerController { ...@@ -406,6 +406,7 @@ public class BrokerController {
@Override @Override
public void onChanged(String path) { public void onChanged(String path) {
if (path.equals(TlsSystemConfig.tlsServerTrustCertPath)) { if (path.equals(TlsSystemConfig.tlsServerTrustCertPath)) {
log.info("The trust certificate changed, reload the ssl context");
reloadServerSslContext(); reloadServerSslContext();
} }
if (path.equals(TlsSystemConfig.tlsServerCertPath)) { if (path.equals(TlsSystemConfig.tlsServerCertPath)) {
...@@ -415,8 +416,8 @@ public class BrokerController { ...@@ -415,8 +416,8 @@ public class BrokerController {
keyChanged = true; keyChanged = true;
} }
if (certChanged && keyChanged) { if (certChanged && keyChanged) {
certChanged = false; log.info("The certificate and private key changed, reload the ssl context");
keyChanged = false; certChanged = keyChanged = false;
reloadServerSslContext(); reloadServerSslContext();
} }
} }
......
...@@ -113,6 +113,7 @@ public class NamesrvController { ...@@ -113,6 +113,7 @@ public class NamesrvController {
@Override @Override
public void onChanged(String path) { public void onChanged(String path) {
if (path.equals(TlsSystemConfig.tlsServerTrustCertPath)) { if (path.equals(TlsSystemConfig.tlsServerTrustCertPath)) {
log.info("The trust certificate changed, reload the ssl context");
reloadServerSslContext(); reloadServerSslContext();
} }
if (path.equals(TlsSystemConfig.tlsServerCertPath)) { if (path.equals(TlsSystemConfig.tlsServerCertPath)) {
...@@ -122,8 +123,8 @@ public class NamesrvController { ...@@ -122,8 +123,8 @@ public class NamesrvController {
keyChanged = true; keyChanged = true;
} }
if (certChanged && keyChanged) { if (certChanged && keyChanged) {
certChanged = false; log.info("The certificate and private key changed, reload the ssl context");
keyChanged = false; certChanged = keyChanged = false;
reloadServerSslContext(); reloadServerSslContext();
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册