diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 890b7b87cb..aae9303bdc 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -95,16 +95,16 @@ TAOS* taos_connect_internal(const char* ip, const char* user, const char* pass, if (initEpSetFromCfg(ip, NULL, &epSet) < 0) { return NULL; } - - if (port) { - epSet.epSet.eps[0].port = port; - } } else { if (initEpSetFromCfg(tsFirst, tsSecond, &epSet) < 0) { return NULL; } } + if (port) { + epSet.epSet.eps[0].port = port; + } + char* key = getClusterKey(user, secretEncrypt, ip, port); SAppInstInfo** pInst = NULL;