add config
This commit is contained in:
parent
1ba3178a85
commit
d4e24280e3
|
@ -422,6 +422,7 @@ void cliConnMayUpdateTimer(SCliConn* conn, int64_t timeout) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroyCliConnQTable(SCliConn* conn) {
|
void destroyCliConnQTable(SCliConn* conn) {
|
||||||
|
SCliThrd* thrd = conn->hostThrd;
|
||||||
int32_t code = 0;
|
int32_t code = 0;
|
||||||
void* pIter = taosHashIterate(conn->pQTable, NULL);
|
void* pIter = taosHashIterate(conn->pQTable, NULL);
|
||||||
while (pIter != NULL) {
|
while (pIter != NULL) {
|
||||||
|
@ -430,6 +431,8 @@ void destroyCliConnQTable(SCliConn* conn) {
|
||||||
transCtxCleanup(ctx);
|
transCtxCleanup(ctx);
|
||||||
pIter = taosHashIterate(conn->pQTable, pIter);
|
pIter = taosHashIterate(conn->pQTable, pIter);
|
||||||
|
|
||||||
|
TAOS_UNUSED(taosHashRemove(thrd->pIdConnTable, qid, sizeof(*qid)));
|
||||||
|
|
||||||
transReleaseExHandle(transGetRefMgt(), *qid);
|
transReleaseExHandle(transGetRefMgt(), *qid);
|
||||||
transRemoveExHandle(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};
|
char addr[TSDB_FQDN_LEN + 64] = {0};
|
||||||
CONN_CONSTRUCT_HASH_KEY(addr, ip, port);
|
CONN_CONSTRUCT_HASH_KEY(addr, ip, port);
|
||||||
|
conn->hostThrd = pThrd;
|
||||||
conn->dstAddr = taosStrdup(addr);
|
conn->dstAddr = taosStrdup(addr);
|
||||||
conn->ipStr = taosStrdup(ip);
|
conn->ipStr = taosStrdup(ip);
|
||||||
conn->port = port;
|
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);
|
TAOS_CHECK_GOTO(TSDB_CODE_OUT_OF_MEMORY, &lino, _failed);
|
||||||
}
|
}
|
||||||
|
|
||||||
conn->hostThrd = pThrd;
|
|
||||||
conn->status = ConnNormal;
|
conn->status = ConnNormal;
|
||||||
conn->broken = false;
|
conn->broken = false;
|
||||||
QUEUE_INIT(&conn->q);
|
QUEUE_INIT(&conn->q);
|
||||||
|
|
Loading…
Reference in New Issue