From a4dbf151aaa397db22238756da6e20874a36f637 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 7 Jun 2022 13:24:35 +0800 Subject: [PATCH] fix: failed to update json idx --- source/libs/transport/src/transCli.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 0090701ba5..e62a73b7fa 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -338,8 +338,7 @@ void cliHandleResp(SCliConn* conn) { return; } - int ret = cliAppCb(conn, &transMsg, pMsg); - if (ret != 0) { + if (cliAppCb(conn, &transMsg, pMsg) != 0) { tTrace("try to send req to next node"); return; } @@ -403,15 +402,13 @@ void cliHandleExcept(SCliConn* pConn) { continue; } } - int ret = cliAppCb(pConn, &transMsg, pMsg); - if (ret != 0) { + if (cliAppCb(pConn, &transMsg, pMsg) != 0) { tTrace("try to send req to next node"); return; } destroyCmsg(pMsg); tTrace("%s cli conn %p start to destroy", CONN_GET_INST_LABEL(pConn), pConn); } while (!transQueueEmpty(&pConn->cliMsgs)); - transUnrefCliHandle(pConn); } @@ -976,7 +973,7 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { arg->param1 = pMsg; arg->param2 = pThrd; transDQSched(pThrd->delayQueue, doDelayTask, arg, TRANS_RETRY_INTERVAL); - cliDestroyConn(pConn, true); + transUnrefCliHandle(pConn); return -1; } } else if (pCtx->retryCount < TRANS_RETRY_COUNT_LIMIT) {