From fbf15d45c061af7e45936960bbd8f1ab2a70ffe5 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Tue, 29 Mar 2022 12:26:01 +0800 Subject: [PATCH] handle execept --- source/libs/stream/src/tstream.c | 2 +- source/libs/transport/src/transSrv.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/libs/stream/src/tstream.c b/source/libs/stream/src/tstream.c index 70651840f7..c5189637ac 100644 --- a/source/libs/stream/src/tstream.c +++ b/source/libs/stream/src/tstream.c @@ -74,7 +74,7 @@ static int32_t streamBuildDispatchMsg(SStreamTask* pTask, SArray* data, SRpcMsg* pMsg->contLen = tlen; pMsg->code = 0; pMsg->msgType = pTask->dispatchMsgType; - /*pMsg->noResp = 1;*/ + pMsg->noResp = 1; return 0; } diff --git a/source/libs/transport/src/transSrv.c b/source/libs/transport/src/transSrv.c index c137657a99..dfb5eb35d6 100644 --- a/source/libs/transport/src/transSrv.c +++ b/source/libs/transport/src/transSrv.c @@ -214,9 +214,11 @@ static void uvHandleReq(SSrvConn* pConn) { // no ref here } - if (pHead->noResp == 0) { - transMsg.handle = pConn; - } + // if pHead->noResp = 1, + // 1. server application should not send resp on handle + // 2. once send out data, cli conn released to conn pool immediately + // 3. not mixed with persist + transMsg.handle = pConn; STrans* pTransInst = pConn->pTransInst; (*pTransInst->cfp)(pTransInst->parent, &transMsg, NULL); -- GitLab