fix Namesrv auto discovery not work

This commit is contained in:
tigerweili
2022-06-23 11:49:47 +08:00
parent 8a98152f68
commit dbc3972498
2 changed files with 2 additions and 2 deletions
@@ -86,7 +86,7 @@ public class BrokerOuterAPI {
public String fetchNameServerAddr() {
try {
String addrs = this.topAddressing.fetchNSAddr();
if (addrs != null) {
if (addrs != null && !UtilAll.isBlank(addrs)) {
if (!addrs.equals(this.nameSrvAddr)) {
log.info("name server address changed, old: {} new: {}", this.nameSrvAddr, addrs);
this.updateNameServerAddressList(addrs);
@@ -227,7 +227,7 @@ public class MQClientAPIImpl {
public String fetchNameServerAddr() {
try {
String addrs = this.topAddressing.fetchNSAddr();
if (addrs != null) {
if (addrs != null && !UtilAll.isBlank(addrs)) {
if (!addrs.equals(this.nameSrvAddr)) {
log.info("name server address changed, old=" + this.nameSrvAddr + ", new=" + addrs);
this.updateNameServerAddressList(addrs);