put a check there

This commit is contained in:
Jeff Tao 2020-06-09 11:48:00 +00:00
parent c0aed5989c
commit 06d6b18a24
2 changed files with 4 additions and 0 deletions

View File

@ -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);

View File

@ -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;