diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 0932241abfc126e21a7a0f61c0c40dcbcb06b8af..2c5c4810af746e4569df9eec14769359d4515d18 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -582,8 +582,13 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrdObj* pThrd) { SCliConn* conn = cliGetConn(pMsg, pThrd); if (conn != NULL) { - taosArrayPush(conn->cliMsgs, &pMsg); conn->hThrdIdx = pCtx->hThrdIdx; + + if (taosArrayGetSize(conn->cliMsgs) > 0) { + taosArrayPush(conn->cliMsgs, &pMsg); + return; + } + taosArrayPush(conn->cliMsgs, &pMsg); transDestroyBuffer(&conn->readBuf); cliSend(conn); } else { diff --git a/source/libs/transport/test/transUT.cc b/source/libs/transport/test/transUT.cc index b3fbade050eea96917dc1e7430af3d95630e8316..bdbfb4a0ae9209c80c2896766fc8b0d3765d2088 100644 --- a/source/libs/transport/test/transUT.cc +++ b/source/libs/transport/test/transUT.cc @@ -50,6 +50,7 @@ static void *ConstructArgForSpecificMsgType(void *parent, tmsg_t msgType) { } // server except static bool handleExcept(void *parent, tmsg_t msgType) { + // return msgType == TDMT_VND_QUERY || msgType == TDMT_VND_FETCH_RSP || msgType == TDMT_VND_RES_READY_RSP; } typedef void (*CB)(void *parent, SRpcMsg *pMsg, SEpSet *pEpSet);