add config

This commit is contained in:
yihaoDeng 2024-10-10 14:40:25 +08:00
parent 8e6a51bfe1
commit 142ded06c6
1 changed files with 3 additions and 2 deletions

View File

@ -894,7 +894,7 @@ static void addConnToPool(void* pool, SCliConn* conn) {
conn->heapMissHit = 0;
if (conn->list->size >= 10) {
if (conn->list->size >= 2) {
STaskArg* arg = taosMemoryCalloc(1, sizeof(STaskArg));
if (arg == NULL) return;
arg->param1 = conn;
@ -2539,12 +2539,13 @@ static FORCE_INLINE void doCloseIdleConn(void* param) {
STaskArg* arg = param;
SCliConn* conn = arg->param1;
tDebug("%s conn %p idle, close it", CONN_GET_INST_LABEL(conn), conn);
conn->task = NULL;
taosMemoryFree(arg);
int32_t ref = transUnrefCliHandle(conn);
if (ref <= 0) {
return;
}
taosMemoryFree(arg);
}
static FORCE_INLINE void cliPerfLog_schedMsg(SCliReq* pReq, char* label) {
int32_t code = 0;