提交 28db4c8a 编写于 作者: dengyihao's avatar dengyihao

fix: limit session num

上级 0712198e
...@@ -336,12 +336,8 @@ bool cliMaySendCachedMsg(SCliConn* conn) { ...@@ -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) { ...@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册