提交 9b77e2df 编写于 作者: dengyihao's avatar dengyihao

fix: limit session num

上级 84706fe5
...@@ -1096,6 +1096,8 @@ static void cliHandleBatchReq(SCliBatch* pBatch, SCliThrd* pThrd) { ...@@ -1096,6 +1096,8 @@ static void cliHandleBatchReq(SCliBatch* pBatch, SCliThrd* pThrd) {
nList->numOfConn++; nList->numOfConn++;
QUEUE_INIT(&nList->msgQ); QUEUE_INIT(&nList->msgQ);
taosHashPut(pThrd->connLimitCache, conn->ip, strlen(conn->ip), &nList, sizeof(void*)); taosHashPut(pThrd->connLimitCache, conn->ip, strlen(conn->ip), &nList, sizeof(void*));
} else {
(*list)->numOfConn++;
} }
uv_timer_start(conn->timer, cliConnTimeout, TRANS_CONN_TIMEOUT, 0); uv_timer_start(conn->timer, cliConnTimeout, TRANS_CONN_TIMEOUT, 0);
return; return;
...@@ -1400,7 +1402,6 @@ static void doFreeTimeoutMsg(void* param) { ...@@ -1400,7 +1402,6 @@ static void doFreeTimeoutMsg(void* param) {
STrans* pTransInst = pThrd->pTransInst; STrans* pTransInst = pThrd->pTransInst;
QUEUE_REMOVE(&pMsg->q); QUEUE_REMOVE(&pMsg->q);
STraceId* trace = &pMsg->msg.info.traceId; STraceId* trace = &pMsg->msg.info.traceId;
tGTrace("%s msg %s cannot get available conn after timeout", pTransInst->label, TMSG_INFO(pMsg->msg.msgType)); tGTrace("%s msg %s cannot get available conn after timeout", pTransInst->label, TMSG_INFO(pMsg->msg.msgType));
doNotifyApp(pMsg, pThrd); doNotifyApp(pMsg, pThrd);
...@@ -1531,6 +1532,8 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) { ...@@ -1531,6 +1532,8 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) {
nList->numOfConn++; nList->numOfConn++;
QUEUE_INIT(&nList->msgQ); QUEUE_INIT(&nList->msgQ);
taosHashPut(pThrd->connLimitCache, conn->ip, strlen(conn->ip), &nList, sizeof(void*)); taosHashPut(pThrd->connLimitCache, conn->ip, strlen(conn->ip), &nList, sizeof(void*));
} else {
(*list)->numOfConn++;
} }
uv_timer_start(conn->timer, cliConnTimeout, TRANS_CONN_TIMEOUT, 0); uv_timer_start(conn->timer, cliConnTimeout, TRANS_CONN_TIMEOUT, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册