fix: limit session num
This commit is contained in:
parent
0712198e21
commit
28db4c8a8c
|
@ -336,12 +336,8 @@ bool cliMaySendCachedMsg(SCliConn* conn) {
|
||||||
if (!transQueueEmpty(&conn->cliMsgs)) {
|
if (!transQueueEmpty(&conn->cliMsgs)) {
|
||||||
SCliMsg* pCliMsg = NULL;
|
SCliMsg* pCliMsg = NULL;
|
||||||
CONN_GET_NEXT_SENDMSG(conn);
|
CONN_GET_NEXT_SENDMSG(conn);
|
||||||
if (pCliMsg == NULL)
|
cliSend(conn);
|
||||||
return false;
|
return true;
|
||||||
else {
|
|
||||||
cliSend(conn);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
_RETURN:
|
_RETURN:
|
||||||
|
@ -616,7 +612,7 @@ static void addConnToPool(void* pool, SCliConn* conn) {
|
||||||
queue* h = QUEUE_HEAD(&(*msglist)->msgQ);
|
queue* h = QUEUE_HEAD(&(*msglist)->msgQ);
|
||||||
QUEUE_REMOVE(h);
|
QUEUE_REMOVE(h);
|
||||||
SCliMsg* pMsg = QUEUE_DATA(h, SCliMsg, q);
|
SCliMsg* pMsg = QUEUE_DATA(h, SCliMsg, q);
|
||||||
|
conn->status = ConnNormal;
|
||||||
transDQCancel(thrd->waitConnQueue, pMsg->ctx->task);
|
transDQCancel(thrd->waitConnQueue, pMsg->ctx->task);
|
||||||
transCtxMerge(&conn->ctx, &pMsg->ctx->appCtx);
|
transCtxMerge(&conn->ctx, &pMsg->ctx->appCtx);
|
||||||
transQueuePush(&conn->cliMsgs, pMsg);
|
transQueuePush(&conn->cliMsgs, pMsg);
|
||||||
|
|
Loading…
Reference in New Issue