Merge pull request #21322 from taosdata/fix/status-resp-return-null-when-only-one-ep
status resp return null when only one ep
This commit is contained in:
commit
7374ea2f0b
|
@ -23,6 +23,10 @@ static inline void dmBuildMnodeRedirectRsp(SDnode *pDnode, SRpcMsg *pMsg) {
|
||||||
SEpSet epSet = {0};
|
SEpSet epSet = {0};
|
||||||
dmGetMnodeEpSetForRedirect(&pDnode->data, pMsg, &epSet);
|
dmGetMnodeEpSetForRedirect(&pDnode->data, pMsg, &epSet);
|
||||||
|
|
||||||
|
if (epSet.numOfEps == 1) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const int32_t contLen = tSerializeSEpSet(NULL, 0, &epSet);
|
const int32_t contLen = tSerializeSEpSet(NULL, 0, &epSet);
|
||||||
pMsg->pCont = rpcMallocCont(contLen);
|
pMsg->pCont = rpcMallocCont(contLen);
|
||||||
if (pMsg->pCont == NULL) {
|
if (pMsg->pCont == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue