diff --git a/source/libs/transport/src/trans.c b/source/libs/transport/src/trans.c index 0eac12f7c5d834d2070c8982227a92de82045ddd..e026d98091f2a014f1553a510f01f73d7c0da40d 100644 --- a/source/libs/transport/src/trans.c +++ b/source/libs/transport/src/trans.c @@ -47,6 +47,10 @@ void* rpcOpen(const SRpcInit* pInit) { } pRpc->compressSize = pInit->compressSize; + if (pRpc->compressSize < 0) { + pRpc->compressSize = -1; + } + pRpc->encryption = pInit->encryption; pRpc->retryLimit = pInit->retryLimit; pRpc->retryInterval = pInit->retryInterval; diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 03e3fb52c4110f61c1c47360f20e5e5fc57a7e9a..0736b763a58dde1dc7cef5897f4379cdb23a84e1 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -604,6 +604,7 @@ static int32_t allocConnRef(SCliConn* conn, bool update) { static int32_t specifyConnRef(SCliConn* conn, bool update, int64_t handle) { if (update) { + transReleaseExHandle(transGetRefMgt(), conn->refId); transRemoveExHandle(transGetRefMgt(), conn->refId); conn->refId = -1; } @@ -956,7 +957,6 @@ static void cliHandleRelease(SCliMsg* pMsg, SCliThrd* pThrd) { SCliConn* conn = exh->handle; transReleaseExHandle(transGetRefMgt(), refId); - tDebug("%s conn %p start to release to inst", CONN_GET_INST_LABEL(conn), conn); if (T_REF_VAL_GET(conn) == 2) { @@ -1574,6 +1574,9 @@ bool cliGenRetryRule(SCliConn* pConn, STransMsg* pResp, SCliMsg* pMsg) { pCtx->retryStep = 0; pCtx->retryInit = true; pCtx->retryCode = TSDB_CODE_SUCCESS; + + // already retry, not use handle specified by app; + pMsg->msg.info.handle = 0; } if (-1 != pCtx->retryMaxTimeout && taosGetTimestampMs() - pCtx->retryInitTimestamp >= pCtx->retryMaxTimeout) {