add config

This commit is contained in:
yihaoDeng 2024-10-09 21:47:51 +08:00
parent 1ba3178a85
commit d4e24280e3
1 changed files with 6 additions and 3 deletions

View File

@ -422,6 +422,7 @@ void cliConnMayUpdateTimer(SCliConn* conn, int64_t timeout) {
}
void destroyCliConnQTable(SCliConn* conn) {
SCliThrd* thrd = conn->hostThrd;
int32_t code = 0;
void* pIter = taosHashIterate(conn->pQTable, NULL);
while (pIter != NULL) {
@ -430,6 +431,8 @@ void destroyCliConnQTable(SCliConn* conn) {
transCtxCleanup(ctx);
pIter = taosHashIterate(conn->pQTable, pIter);
TAOS_UNUSED(taosHashRemove(thrd->pIdConnTable, qid, sizeof(*qid)));
transReleaseExHandle(transGetRefMgt(), *qid);
transRemoveExHandle(transGetRefMgt(), *qid);
}
@ -996,6 +999,7 @@ static int32_t cliCreateConn(SCliThrd* pThrd, SCliConn** pCliConn, char* ip, int
char addr[TSDB_FQDN_LEN + 64] = {0};
CONN_CONSTRUCT_HASH_KEY(addr, ip, port);
conn->hostThrd = pThrd;
conn->dstAddr = taosStrdup(addr);
conn->ipStr = taosStrdup(ip);
conn->port = port;
@ -1003,7 +1007,6 @@ static int32_t cliCreateConn(SCliThrd* pThrd, SCliConn** pCliConn, char* ip, int
TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, &lino, _failed);
}
conn->hostThrd = pThrd;
conn->status = ConnNormal;
conn->broken = false;
QUEUE_INIT(&conn->q);