merge trans

This commit is contained in:
yihaoDeng 2022-03-22 17:01:02 +08:00
parent 28c930f920
commit 3c82cae1f1
2 changed files with 6 additions and 2 deletions

View File

@ -265,7 +265,7 @@ _RETURN:
void cliHandleExcept(SCliConn* pConn) {
if (transQueueEmpty(&pConn->cliMsgs)) {
if (pConn->broken == true || CONN_NO_PERSIST_BY_APP(pConn)) {
if (pConn->broken == true && CONN_NO_PERSIST_BY_APP(pConn)) {
transUnrefCliHandle(pConn);
return;
}

View File

@ -291,7 +291,11 @@ void uvOnSendCb(uv_write_t* req, int status) {
memset(&conn->regArg, 0, sizeof(conn->regArg));
}
transQueuePop(&conn->srvMsgs);
free(msg);
tfree(msg);
msg = (SSrvMsg*)transQueuePop(&conn->srvMsgs);
if (msg != NULL) {
uvStartSendRespInternal(msg);
}
} else {
uvStartSendRespInternal(msg);
}