enh/defaultEpSet

This commit is contained in:
dapan1121 2022-05-25 14:46:34 +08:00
parent f75bcdf4b2
commit c1a774c64f
1 changed files with 4 additions and 1 deletions

View File

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