提交 876aed08 编写于 作者: K kailixu

chore: set err code when rpcConn error

上级 a8d2f7ff
......@@ -663,9 +663,6 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcEpSet *pEpSet) {
memcpy(pRes->pRsp, rpcMsg->pCont, pRes->rspLen);
}
} else {
if (!rpcMsg->pCont && TSDB_CODE_SUCCESS == pRes->code) {
pRes->code = TSDB_CODE_RPC_UNEXPECTED_RESPONSE;
}
tfree(pRes->pRsp);
}
......
......@@ -1535,7 +1535,7 @@ static void rpcProcessConnError(void *param, void *id) {
if (pContext->numOfTry >= pContext->epSet.numOfEps || pContext->msgType == TSDB_MSG_TYPE_FETCH) {
rpcMsg.msgType = pContext->msgType + 1;
rpcMsg.ahandle = pContext->ahandle;
rpcMsg.code = pContext->code;
rpcMsg.code = pContext->code != TSDB_CODE_SUCCESS ? pContext->code : TSDB_CODE_RPC_TOO_SLOW;
rpcMsg.pCont = NULL;
rpcMsg.contLen = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册