From c1a774c64feb9e7f7fd411254a4bb2a9981d031d Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Wed, 25 May 2022 14:46:34 +0800 Subject: [PATCH] enh/defaultEpSet --- source/client/src/clientMsgHandler.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/client/src/clientMsgHandler.c b/source/client/src/clientMsgHandler.c index dfce01dd63..33d0d9feb4 100644 --- a/source/client/src/clientMsgHandler.c +++ b/source/client/src/clientMsgHandler.c @@ -58,7 +58,10 @@ int32_t processConnectRsp(void* param, const SDataBuf* pMsg, int32_t code) { return code; } - if (connectRsp.dnodeNum > 1 && !isEpsetEqual(&pTscObj->pAppInfo->mgmtEp.epSet, &connectRsp.epSet)) { + if (connectRsp.dnodeNum == 1) { + SEpSet epset = getEpSet_s(&pTscObj->pAppInfo->mgmtEp); + rpcSetDefaultEpSet(pTscObj->pAppInfo->pTransporter, &epset); + } else if (connectRsp.dnodeNum > 1 && !isEpsetEqual(&pTscObj->pAppInfo->mgmtEp.epSet, &connectRsp.epSet)) { updateEpSet_s(&pTscObj->pAppInfo->mgmtEp, &connectRsp.epSet); } -- GitLab