Merge pull request #18327 from taosdata/fix/TS-2138

fix: avoid invalid check
This commit is contained in:
Shengliang Guan 2022-11-22 14:29:43 +08:00 committed by GitHub
commit ccf28cdb90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -277,7 +277,9 @@ static int32_t taosAddServerLogCfg(SConfig *pCfg) {
static int32_t taosAddClientCfg(SConfig *pCfg) { static int32_t taosAddClientCfg(SConfig *pCfg) {
char defaultFqdn[TSDB_FQDN_LEN] = {0}; char defaultFqdn[TSDB_FQDN_LEN] = {0};
int32_t defaultServerPort = 6030; int32_t defaultServerPort = 6030;
if (taosGetFqdn(defaultFqdn) != 0) return -1; if (taosGetFqdn(defaultFqdn) != 0) {
strcpy(defaultFqdn, "localhost");
}
if (cfgAddString(pCfg, "firstEp", "", 1) != 0) return -1; if (cfgAddString(pCfg, "firstEp", "", 1) != 0) return -1;
if (cfgAddString(pCfg, "secondEp", "", 1) != 0) return -1; if (cfgAddString(pCfg, "secondEp", "", 1) != 0) return -1;