This commit is contained in:
Haojun Liao 2020-06-25 00:26:32 +08:00
parent afcc90a4b4
commit bc4925ac0b
1 changed files with 4 additions and 1 deletions

View File

@ -195,7 +195,10 @@ int tscSendMsgToServer(SSqlObj *pSql) {
.code = 0
};
pSql->pRpcCtx = rpcSendRequest(pObj->pDnodeConn, &pSql->ipList, &rpcMsg);
// NOTE: the rpc context should be acquired before sent data to server.
// Otherwise, the pSql object may have been released already in during the processMsgFromServer function, in the
// meanwhile, the assignment of the rpc context to sql object will absolutely caused crash.
/*pSql->pRpcCtx = */rpcSendRequest(pObj->pDnodeConn, &pSql->ipList, &rpcMsg);
return TSDB_CODE_SUCCESS;
}