From 8e9b253574e906f886ab6f7fc4ffe8f3c7f9a4ef Mon Sep 17 00:00:00 2001 From: dmchen Date: Tue, 16 May 2023 11:31:23 +0800 Subject: [PATCH] status resp return null when only one ep --- source/dnode/mgmt/node_mgmt/src/dmTransport.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c index ea46b70693..7ecf2fd234 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c +++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c @@ -23,6 +23,10 @@ static inline void dmBuildMnodeRedirectRsp(SDnode *pDnode, SRpcMsg *pMsg) { SEpSet epSet = {0}; dmGetMnodeEpSetForRedirect(&pDnode->data, pMsg, &epSet); + if (epSet.numOfEps == 1) { + return; + } + const int32_t contLen = tSerializeSEpSet(NULL, 0, &epSet); pMsg->pCont = rpcMallocCont(contLen); if (pMsg->pCont == NULL) { -- GitLab