fix: fix compile error

This commit is contained in:
yihaoDeng 2022-09-10 23:27:05 +08:00
parent 26d86477f9
commit 440d14e36c
1 changed files with 6 additions and 6 deletions

View File

@ -1438,11 +1438,11 @@ SCliThrd* transGetWorkThrd(STrans* trans, int64_t handle, bool* validHandle) {
return ((SCliObj*)trans->tcphandle)->pThreadObj[idx]; return ((SCliObj*)trans->tcphandle)->pThreadObj[idx];
} }
SCliThrd* pThrd = transGetWorkThrdFromHandle(handle, validHandle); SCliThrd* pThrd = transGetWorkThrdFromHandle(handle, validHandle);
if (*validHandle == true && pThrd == NULL) { // if (pThrd == NULL) {
int idx = cliRBChoseIdx(trans); // int idx = cliRBChoseIdx(trans);
if (idx < 0) return NULL; // if (idx < 0) return NULL;
pThrd = ((SCliObj*)trans->tcphandle)->pThreadObj[idx]; // pThrd = ((SCliObj*)trans->tcphandle)->pThreadObj[idx];
} // }
return pThrd; return pThrd;
} }
int transReleaseCliHandle(void* handle) { int transReleaseCliHandle(void* handle) {
@ -1484,7 +1484,7 @@ int transSendRequest(void* shandle, const SEpSet* pEpSet, STransMsg* pReq, STran
bool valid = false; bool valid = false;
SCliThrd* pThrd = transGetWorkThrd(pTransInst, (int64_t)pReq->info.handle, &valid); SCliThrd* pThrd = transGetWorkThrd(pTransInst, (int64_t)pReq->info.handle, &valid);
if (pThrd == NULL && valid == false) { if (pThrd == NULL) {
transFreeMsg(pReq->pCont); transFreeMsg(pReq->pCont);
transReleaseExHandle(transGetInstMgt(), (int64_t)shandle); transReleaseExHandle(transGetInstMgt(), (int64_t)shandle);
return TSDB_CODE_RPC_BROKEN_LINK; return TSDB_CODE_RPC_BROKEN_LINK;