diff --git a/src/dnode/src/dnodePeer.c b/src/dnode/src/dnodePeer.c index eb017c335ea1fa2b04a73a558d2796f4c4066a71..0adaad7740cc583c9fccf7e5e7ed804a5b045b7d 100644 --- a/src/dnode/src/dnodePeer.c +++ b/src/dnode/src/dnodePeer.c @@ -88,6 +88,8 @@ static void dnodeProcessReqMsgFromDnode(SRpcMsg *pMsg, SRpcIpSet *pIpSet) { rspMsg.pCont = NULL; rspMsg.contLen = 0; + if (pMsg->pCont == NULL) return; + if (dnodeGetRunStatus() != TSDB_DNODE_RUN_STATUS_RUNING) { rspMsg.code = TSDB_CODE_RPC_NOT_READY; rpcSendResponse(&rspMsg); diff --git a/src/dnode/src/dnodeShell.c b/src/dnode/src/dnodeShell.c index 8eba1f3775fb91c97b208ba185c0094150fddfd2..d60bd2b6c615186fd74dc0215fe602164fc6dad2 100644 --- a/src/dnode/src/dnodeShell.c +++ b/src/dnode/src/dnodeShell.c @@ -113,6 +113,8 @@ void dnodeProcessMsgFromShell(SRpcMsg *pMsg, SRpcIpSet *pIpSet) { rpcMsg.pCont = NULL; rpcMsg.contLen = 0; + if (pMsg->pCont == NULL) return; + if (dnodeGetRunStatus() != TSDB_DNODE_RUN_STATUS_RUNING) { dError("RPC %p, shell msg:%s is ignored since dnode not running", pMsg->handle, taosMsg[pMsg->msgType]); rpcMsg.code = TSDB_CODE_RPC_NOT_READY;