From ced76efde0ec2b8d40eca54a23cf6b7e63df99b7 Mon Sep 17 00:00:00 2001 From: Alex Duan <417921451@qq.com> Date: Wed, 21 Dec 2022 12:44:29 +0800 Subject: [PATCH] feat(rpc): move the check msgType to cliet --- source/client/src/clientImpl.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/client/src/clientImpl.c b/source/client/src/clientImpl.c index 0bf91c6db8..2e76d50be5 100644 --- a/source/client/src/clientImpl.c +++ b/source/client/src/clientImpl.c @@ -1424,11 +1424,12 @@ void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) { memcpy((void*)tEpSet, (void*)pEpSet, sizeof(SEpSet)); } + // pMsg is response msg switch (pMsg->msgType) { - case TDMT_VND_BATCH_META: - case TDMT_VND_SUBMIT: - case TDMT_SCH_QUERY: - case TDMT_SCH_MERGE_QUERY: + case TDMT_VND_BATCH_META + 1: + case TDMT_VND_SUBMIT + 1: + case TDMT_SCH_QUERY + 1: + case TDMT_SCH_MERGE_QUERY + 1: // uniform to one error code: TSDB_CODE_RPC_VGROUP_NOT_CONNECTED if (pMsg->code == TSDB_CODE_RPC_VGROUP_BROKEN_LINK) { pMsg->code = TSDB_CODE_RPC_VGROUP_NOT_CONNECTED;