From 63bad2e4fbb770034dfe03d18306ede786127bef Mon Sep 17 00:00:00 2001 From: kailixu Date: Mon, 24 Apr 2023 09:57:48 +0800 Subject: [PATCH] chore: code optimization --- source/client/src/clientHb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index 555aefc21b..3b07fcf7ab 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -792,7 +792,13 @@ SClientHbBatchReq *hbGatherAllInfo(SAppHbMgr *pAppHbMgr) { default: break; } - code = (*clientHbMgr.reqHandle[pOneReq->connKey.connType])(&pOneReq->connKey, ¶m, pOneReq); + if (clientHbMgr.reqHandle[pOneReq->connKey.connType]) { + code = (*clientHbMgr.reqHandle[pOneReq->connKey.connType])(&pOneReq->connKey, ¶m, pOneReq); + if (code) { + tscWarn("hbGatherAllInfo failed since %s, tscRid:%" PRIi64 ", connType:%" PRIi8, tstrerror(code), + pOneReq->connKey.tscRid, pOneReq->connKey.connType); + } + } break; #if 0