fix client deadlock
This commit is contained in:
parent
af232fc2d4
commit
cfedc4d67a
|
@ -891,7 +891,6 @@ SCliConn* cliGetConn(SCliMsg* pMsg, SCliThrd* pThrd, bool* ignore) {
|
||||||
SExHandle* exh = transAcquireExHandle(transGetRefMgt(), refId);
|
SExHandle* exh = transAcquireExHandle(transGetRefMgt(), refId);
|
||||||
if (exh == NULL) {
|
if (exh == NULL) {
|
||||||
*ignore = true;
|
*ignore = true;
|
||||||
destroyCmsg(pMsg);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
conn = exh->handle;
|
conn = exh->handle;
|
||||||
|
@ -937,7 +936,16 @@ void cliHandleReq(SCliMsg* pMsg, SCliThrd* pThrd) {
|
||||||
bool ignore = false;
|
bool ignore = false;
|
||||||
SCliConn* conn = cliGetConn(pMsg, pThrd, &ignore);
|
SCliConn* conn = cliGetConn(pMsg, pThrd, &ignore);
|
||||||
if (ignore == true) {
|
if (ignore == true) {
|
||||||
tError("ignore msg");
|
// persist conn already release by server
|
||||||
|
STransMsg resp = {0};
|
||||||
|
resp.code = TSDB_CODE_RPC_BROKEN_LINK;
|
||||||
|
resp.msgType = pMsg->msg.msgType + 1;
|
||||||
|
|
||||||
|
resp.info.ahandle = pMsg && pMsg->ctx ? pMsg->ctx->ahandle : NULL;
|
||||||
|
resp.info.traceId = pMsg->msg.info.traceId;
|
||||||
|
|
||||||
|
pTransInst->cfp(pTransInst->parent, &resp, NULL);
|
||||||
|
destroyCmsg(pMsg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue