Merge pull request #4690 from taosdata/hotfix/TD-2548
[TD-2548]<fix>:wrong error message is showed when taos connect failed
This commit is contained in:
commit
6f1b97472c
|
@ -284,16 +284,18 @@ void taos_close(TAOS *taos) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
SSqlObj* pHb = (SSqlObj*)taosAcquireRef(tscObjRef, pObj->hbrid);
|
if (RID_VALID(pObj->hbrid)) {
|
||||||
if (pHb != NULL) {
|
SSqlObj* pHb = (SSqlObj*)taosAcquireRef(tscObjRef, pObj->hbrid);
|
||||||
if (pHb->rpcRid > 0) { // wait for rsp from dnode
|
if (pHb != NULL) {
|
||||||
rpcCancelRequest(pHb->rpcRid);
|
if (RID_VALID(pHb->rpcRid)) { // wait for rsp from dnode
|
||||||
pHb->rpcRid = -1;
|
rpcCancelRequest(pHb->rpcRid);
|
||||||
}
|
pHb->rpcRid = -1;
|
||||||
|
}
|
||||||
|
|
||||||
tscDebug("%p HB is freed", pHb);
|
tscDebug("%p HB is freed", pHb);
|
||||||
taosReleaseRef(tscObjRef, pHb->self);
|
taosReleaseRef(tscObjRef, pHb->self);
|
||||||
taos_free_result(pHb);
|
taos_free_result(pHb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tscDebug("%p all sqlObj are freed, free tscObj and close dnodeConn:%p", pObj, pObj->pDnodeConn);
|
tscDebug("%p all sqlObj are freed, free tscObj and close dnodeConn:%p", pObj, pObj->pDnodeConn);
|
||||||
|
|
|
@ -52,6 +52,8 @@ void *taosIterateRef(int rsetId, int64_t rid);
|
||||||
// return the number of references in system
|
// return the number of references in system
|
||||||
int taosListRef();
|
int taosListRef();
|
||||||
|
|
||||||
|
#define RID_VALID(x) ((x) > 0)
|
||||||
|
|
||||||
/* sample code to iterate the refs
|
/* sample code to iterate the refs
|
||||||
|
|
||||||
void demoIterateRefs(int rsetId) {
|
void demoIterateRefs(int rsetId) {
|
||||||
|
|
Loading…
Reference in New Issue