diff --git a/src/common/src/tglobal.c b/src/common/src/tglobal.c index f44af78e9a547af84ed4cf4aa78c1b7c9ce51700..86fc6deb1b59802ebd699a5ae6ac68e1492cc54f 100644 --- a/src/common/src/tglobal.c +++ b/src/common/src/tglobal.c @@ -1262,10 +1262,11 @@ bool taosCheckGlobalCfg() { taosSetAllDebugFlag(); } - if (tsLocalFqdn[0] == 0) - taosGetFqdn(tsLocalEp); - else - strcpy(tsLocalEp, tsLocalFqdn); + if (tsLocalFqdn[0] == 0) { + taosGetFqdn(tsLocalFqdn); + } + + strcpy(tsLocalEp, tsLocalFqdn); snprintf(tsLocalEp + strlen(tsLocalEp), sizeof(tsLocalEp), ":%d", tsServerPort); uPrint("localEp is: %s", tsLocalEp);