diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 54df0525960f..6566bf9e79f3 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -1437,7 +1437,16 @@ static TBOOL rpcSendReqToServer(SRpcInfo *pRpc, SRpcReqContext *pContext) { taosTmrReset(rpcProcessRetryTimer, tsRpcTimer, pConn, pRpc->tmrCtrl, &pConn->pTimer); rpcUnlockConn(pConn); - return ret ? BOOL_TRUE : BOOL_FALSE; + + if(ret == BOOL_FALSE) { + // try next ip again + pContext->code = terrno; + // in rpcProcessConnError if numOfTry over limit, could call rpcNotifyClient to stop query + taosTmrStart(rpcProcessConnError, 1, pContext, pRpc->tmrCtrl); + return BOOL_ASYNC; + } + + return BOOL_TRUE; } static bool rpcSendMsgToPeer(SRpcConn *pConn, void *msg, int msgLen) {