From 09e727544dadf5b1425c2857e58821d6588a08e9 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 4 Dec 2020 17:22:19 +0800 Subject: [PATCH] [TD-225] fix bugs in heartBeatactivitytimer --- src/client/src/tscServer.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index 5e3acaa0b7..a011ac2f3a 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -191,9 +191,16 @@ void tscProcessHeartBeatRsp(void *param, TAOS_RES *tres, int code) { void tscProcessActivityTimer(void *handle, void *tmrId) { int64_t rid = (int64_t) handle; STscObj *pObj = taosAcquireRef(tscRefId, rid); - if (pObj == NULL) return; + if (pObj == NULL) { + return; + } SSqlObj* pHB = taosAcquireRef(tscObjRef, pObj->hbrid); + if (pHB == NULL) { + taosReleaseRef(tscRefId, rid); + return; + } + assert(pHB->self == pObj->hbrid); pHB->retry = 0; -- GitLab