From 7cd259592f2752b336a667e881f48dc753216a15 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 22 Apr 2022 15:57:49 +0800 Subject: [PATCH] fix(driver): the user specified port that is in taos_connect API is active. --- source/client/src/clientImpl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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;