diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index f50d3e0698e1a80461eb2c08a311d7e22232b67f..f1c6deb1d07458585ebb8a069fc182f7b53e1312 100755 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -726,10 +726,6 @@ static int rpcProcessRspHead(SRpcConn *pConn, SRpcHead *pHead) { return TSDB_CODE_INVALID_RESPONSE_TYPE; } - if (pHead->code == TSDB_CODE_NOT_READY) { - return TSDB_CODE_ALREADY_PROCESSED; - } - taosTmrStopA(&pConn->pTimer); pConn->retry = 0; @@ -936,8 +932,8 @@ static void rpcProcessIncomingMsg(SRpcConn *pConn, SRpcHead *pHead) { tTrace("%s %p, redirect is received, numOfIps:%d", pRpc->label, pConn, pContext->ipSet.numOfIps); rpcSendReqToServer(pRpc, pContext); } else if (pHead->code == TSDB_CODE_NOT_READY) { - pConn->pContext->code = pHead->code; - rpcProcessConnError(pConn->pContext, NULL); + pContext->code = pHead->code; + rpcProcessConnError(pContext, NULL); } else { rpcNotifyClient(pContext, &rpcMsg); } @@ -1106,7 +1102,7 @@ static void rpcProcessConnError(void *param, void *id) { tTrace("%s connection error happens", pRpc->label); - if ( pContext->numOfTry >= pContext->ipSet.numOfIps ) { + if (pContext->numOfTry >= pContext->ipSet.numOfIps) { rpcMsg.msgType = pContext->msgType+1; rpcMsg.handle = pContext->ahandle; rpcMsg.code = pContext->code;