diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 9f512eb62bfc5c5a54e501e9445f559daab60a73..85915f780dbde55a4fb982d86490944c391b1b2f 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -397,7 +397,7 @@ void *tscProcessMsgFromServer(char *msg, void *ahandle, void *thandle) { SMeterMetaInfo *pMeterMetaInfo = tscGetMeterMetaInfo(pCmd, 0); if (msg == NULL) { - tscTrace("%p no response from ip:0x%x", pSql, pSql->ip); + tscTrace("%p no response from ip:%s", pSql, taosIpStr(pSql->ip)); pSql->index++; pSql->thandle = NULL; diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index 48a360913832906b7b75b26fb8641b88b914b44e..795c9af31854b53cbcfc0a02dbee81d2b0dddba9 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -64,11 +64,15 @@ TAOS *taos_connect_imp(const char *ip, const char *user, const char *pass, const } if (ip && ip[0]) { - tscMgmtIpList.numOfIps = 2; + tscMgmtIpList.numOfIps = 4; strcpy(tscMgmtIpList.ipstr[0], ip); tscMgmtIpList.ip[0] = inet_addr(ip); strcpy(tscMgmtIpList.ipstr[1], ip); tscMgmtIpList.ip[1] = inet_addr(ip); + strcpy(tscMgmtIpList.ipstr[2], tsMasterIp); + tscMgmtIpList.ip[2] = inet_addr(tsMasterIp); + strcpy(tscMgmtIpList.ipstr[3], tsSecondIp); + tscMgmtIpList.ip[3] = inet_addr(tsSecondIp); } pObj = (STscObj *)malloc(sizeof(STscObj));