From efc0dd01cabd6ccd2bb75df94671f0e6823a85f1 Mon Sep 17 00:00:00 2001 From: Minglei Jin Date: Mon, 23 May 2022 15:52:41 +0800 Subject: [PATCH] fix: ignore Ref is not there to save true error --- src/client/src/tscSql.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index 849fe0ba73..a025829343 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -211,7 +211,9 @@ TAOS *taos_connect_internal(const char *ip, const char *user, const char *pass, } else { printf("taos connect failed, reason: %s.\n\n", tstrerror(terrno)); } + int32_t lastError = terrno; taos_free_result(pSql); + if (terrno != lastError) terrno = lastError; taos_close(pObj); return NULL; } -- GitLab