put more protection on RPC
This commit is contained in:
parent
a0dd566489
commit
3fbc2ebc67
|
@ -413,7 +413,6 @@ static void dnodeUpdateMnodeInfos(SDMMnodeInfos *pMnodes) {
|
|||
tsDMnodeIpSet.numOfIps = tsDMnodeInfos.nodeNum;
|
||||
for (int32_t i = 0; i < tsDMnodeInfos.nodeNum; i++) {
|
||||
taosGetFqdnPortFromEp(tsDMnodeInfos.nodeInfos[i].nodeEp, tsDMnodeIpSet.fqdn[i], &tsDMnodeIpSet.port[i]);
|
||||
dPrint("mnode index:%d, for peer %s %d", i, tsDMnodeIpSet.fqdn[i], tsDMnodeIpSet.port[i]);
|
||||
}
|
||||
|
||||
dnodeSaveMnodeInfos();
|
||||
|
|
|
@ -420,13 +420,13 @@ void rpcSendResponse(const SRpcMsg *pRsp) {
|
|||
pConn->rspMsgLen = msgLen;
|
||||
if (pMsg->code == TSDB_CODE_ACTION_IN_PROGRESS) pConn->inTranId--;
|
||||
|
||||
rpcUnlockConn(pConn);
|
||||
|
||||
taosTmrStopA(&pConn->pTimer);
|
||||
// taosTmrReset(rpcProcessIdleTimer, pRpc->idleTime, pConn, pRpc->tmrCtrl, &pConn->pIdleTimer);
|
||||
rpcSendMsgToPeer(pConn, msg, msgLen);
|
||||
pConn->secured = 1; // connection shall be secured
|
||||
|
||||
rpcUnlockConn(pConn);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1095,10 +1095,10 @@ static void rpcSendReqToServer(SRpcInfo *pRpc, SRpcReqContext *pContext) {
|
|||
pConn->reqMsgLen = msgLen;
|
||||
pConn->pContext = pContext;
|
||||
|
||||
rpcUnlockConn(pConn);
|
||||
|
||||
taosTmrReset(rpcProcessRetryTimer, tsRpcTimer, pConn, pRpc->tmrCtrl, &pConn->pTimer);
|
||||
rpcSendMsgToPeer(pConn, msg, msgLen);
|
||||
|
||||
rpcUnlockConn(pConn);
|
||||
}
|
||||
|
||||
static void rpcSendMsgToPeer(SRpcConn *pConn, void *msg, int msgLen) {
|
||||
|
|
Loading…
Reference in New Issue