未验证 提交 94611e97 编写于 作者: M Minglei Jin 提交者: GitHub

Merge pull request #12858 from taosdata/fix/TD-15683

fix: ignore Ref is not there to save true error
...@@ -205,7 +205,9 @@ TAOS *taos_connect_internal(const char *ip, const char *user, const char *pass, ...@@ -205,7 +205,9 @@ TAOS *taos_connect_internal(const char *ip, const char *user, const char *pass,
} else { } else {
printf("connect failed, reason: %s.\n\n", tstrerror(terrno)); printf("connect failed, reason: %s.\n\n", tstrerror(terrno));
} }
int32_t lastError = terrno;
taos_free_result(pSql); taos_free_result(pSql);
if (terrno != lastError) terrno = lastError;
taos_close(pObj); taos_close(pObj);
return NULL; return NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册