From 8cbb7bc7164a13d53537eb036270eccc27fcca01 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 24 Jun 2022 14:20:43 +0800 Subject: [PATCH] feat: refactor rpc quit --- source/libs/transport/src/transCli.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index beaef2758e..e563bf0ddd 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -1013,8 +1013,8 @@ int cliAppCb(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { pCtx->retryCount + 1, TRANS_RETRY_COUNT_LIMIT); } if (pThrd->quit == false) { - if (pConn->status != ConnInPool && pResp->code != TSDB_CODE_RPC_NETWORK_UNAVAIL) { - addConnToPool(pThrd->pool, pConn); + if (pResp->code != TSDB_CODE_RPC_NETWORK_UNAVAIL) { + if (pConn->status != ConnInPool) addConnToPool(pThrd->pool, pConn); } else { transUnrefCliHandle(pConn); } -- GitLab