fix: limit session num

This commit is contained in:
yihaoDeng 2023-02-24 23:19:46 +08:00
parent 0712198e21
commit 28db4c8a8c
1 changed files with 3 additions and 7 deletions

View File

@ -336,13 +336,9 @@ bool cliMaySendCachedMsg(SCliConn* conn) {
if (!transQueueEmpty(&conn->cliMsgs)) {
SCliMsg* pCliMsg = NULL;
CONN_GET_NEXT_SENDMSG(conn);
if (pCliMsg == NULL)
return false;
else {
cliSend(conn);
return true;
}
}
return false;
_RETURN:
return false;
@ -616,7 +612,7 @@ static void addConnToPool(void* pool, SCliConn* conn) {
queue* h = QUEUE_HEAD(&(*msglist)->msgQ);
QUEUE_REMOVE(h);
SCliMsg* pMsg = QUEUE_DATA(h, SCliMsg, q);
conn->status = ConnNormal;
transDQCancel(thrd->waitConnQueue, pMsg->ctx->task);
transCtxMerge(&conn->ctx, &pMsg->ctx->appCtx);
transQueuePush(&conn->cliMsgs, pMsg);