diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index 3e5280401fbd3e62fbd56c28fa9d981aa691a40b..6b3653ff636aa92e0b606dea6106f6927c661a14 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -256,6 +256,7 @@ TAOS_RES* taos_query(TAOS *taos, const char *sqlstr) { return NULL; } + tsem_init(&pSql->rspSem, 0, 0); doAsyncQuery(pObj, pSql, waitForQueryRsp, taos, sqlstr, sqlLen); // wait for the callback function to post the semaphore