From 3a3c6fac6bee1e454deecdbc8b94aa2f4ea1336a Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Sat, 6 Aug 2022 18:08:46 +0800 Subject: [PATCH] start timer for particular msg --- source/libs/transport/src/transCli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index b8346370e9..dc7ffa9b13 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -782,7 +782,7 @@ void cliSend(SCliConn* pConn) { } if (pTransInst->startTimer != NULL && pTransInst->startTimer(0, pMsg->msgType)) { - uv_timer_t* timer = taosArrayPop(pThrd->timerList); + uv_timer_t* timer = taosArrayGetSize(pThrd->timerList) > 0 ? *(uv_timer_t**)taosArrayPop(pThrd->timerList) : NULL; if (timer == NULL) { tDebug("no avaiable timer, create"); timer = taosMemoryCalloc(1, sizeof(uv_timer_t));