fix: failed to update json idx

This commit is contained in:
yihaoDeng 2022-06-07 13:24:35 +08:00
parent c607a5efce
commit a4dbf151aa
1 changed files with 3 additions and 6 deletions

View File

@ -338,8 +338,7 @@ void cliHandleResp(SCliConn* conn) {
return; return;
} }
int ret = cliAppCb(conn, &transMsg, pMsg); if (cliAppCb(conn, &transMsg, pMsg) != 0) {
if (ret != 0) {
tTrace("try to send req to next node"); tTrace("try to send req to next node");
return; return;
} }
@ -403,15 +402,13 @@ void cliHandleExcept(SCliConn* pConn) {
continue; continue;
} }
} }
int ret = cliAppCb(pConn, &transMsg, pMsg); if (cliAppCb(pConn, &transMsg, pMsg) != 0) {
if (ret != 0) {
tTrace("try to send req to next node"); tTrace("try to send req to next node");
return; return;
} }
destroyCmsg(pMsg); destroyCmsg(pMsg);
tTrace("%s cli conn %p start to destroy", CONN_GET_INST_LABEL(pConn), pConn); tTrace("%s cli conn %p start to destroy", CONN_GET_INST_LABEL(pConn), pConn);
} while (!transQueueEmpty(&pConn->cliMsgs)); } while (!transQueueEmpty(&pConn->cliMsgs));
transUnrefCliHandle(pConn); transUnrefCliHandle(pConn);
} }
@ -976,7 +973,7 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) {
arg->param1 = pMsg; arg->param1 = pMsg;
arg->param2 = pThrd; arg->param2 = pThrd;
transDQSched(pThrd->delayQueue, doDelayTask, arg, TRANS_RETRY_INTERVAL); transDQSched(pThrd->delayQueue, doDelayTask, arg, TRANS_RETRY_INTERVAL);
cliDestroyConn(pConn, true); transUnrefCliHandle(pConn);
return -1; return -1;
} }
} else if (pCtx->retryCount < TRANS_RETRY_COUNT_LIMIT) { } else if (pCtx->retryCount < TRANS_RETRY_COUNT_LIMIT) {