提交 3c3edeb2 编写于 作者: R root

Unable to establish connection when IP address is NULL

上级 1c3fcabe
...@@ -157,7 +157,7 @@ TAOS *taos_connect_imp(const char *ip, const char *user, const char *pass, const ...@@ -157,7 +157,7 @@ TAOS *taos_connect_imp(const char *ip, const char *user, const char *pass, const
} }
TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, int port) { TAOS *taos_connect(const char *ip, const char *user, const char *pass, const char *db, int port) {
if (ip != NULL && (strcmp("127.0.0.1", ip) == 0 || strcasecmp("localhost", ip) == 0)) { if (ip == NULL || (ip != NULL && (strcmp("127.0.0.1", ip) == 0 || strcasecmp("localhost", ip) == 0))) {
#ifdef CLUSTER #ifdef CLUSTER
ip = tsPrivateIp; ip = tsPrivateIp;
#else #else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册