Skip to content

Commit

Permalink
fix: conn connect order
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed May 23, 2023
1 parent 56ee7eb commit bbb17e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/benchQuery.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ static int multi_thread_specified_table_query(uint16_t iface, char* dbName) {
#endif
} else {
closeBenchConn(pThreadInfo->conn);
pThreadInfo->conn = NULL;
}

// need exit in loop
Expand Down
7 changes: 6 additions & 1 deletion src/benchUtil.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,12 +310,17 @@ SBenchConn* initBenchConn() {
}

void closeBenchConn(SBenchConn* conn) {
if(conn == NULL)
return ;
#ifdef WEBSOCKET
if (g_arguments->websocket) {
ws_close(conn->taos_ws);
} else {
#endif
taos_close(conn->taos);
if(conn->taos) {
taos_close(conn->taos);
conn->taos = NULL;
}
if (conn->ctaos) {
taos_close(conn->ctaos);
conn->ctaos = NULL;
Expand Down

0 comments on commit bbb17e6

Please sign in to comment.