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

feat: refactor rpc quit

上级 ef504358
......@@ -1014,18 +1014,13 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) {
pTransInst->cfp(pTransInst->parent, pResp, NULL);
return 0;
}
STransConnCtx* pCtx = pMsg->ctx;
if (pCtx->retryCnt == 0) {
pCtx->origEpSet = pCtx->epSet;
}
/*
* no retry
* 1. query conn
* 2. rpc thread already receive quit msg
*/
STransConnCtx* pCtx = pMsg->ctx;
int32_t code = pResp->code;
if (CONN_NO_PERSIST_BY_APP(pConn)) {
if (pTransInst->retry != NULL && pTransInst->retry(code)) {
pMsg->sent = 0;
pCtx->retryCnt += 1;
......@@ -1052,7 +1047,6 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) {
}
}
}
}
STraceId* trace = &pResp->info.traceId;
if (pCtx->pSem != NULL) {
......@@ -1185,6 +1179,7 @@ void transSendRecv(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STransM
STransConnCtx* pCtx = taosMemoryCalloc(1, sizeof(STransConnCtx));
pCtx->epSet = *pEpSet;
pCtx->origEpSet = *pEpSet;
pCtx->ahandle = pReq->info.ahandle;
pCtx->msgType = pReq->msgType;
pCtx->pSem = sem;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册