From fa719d5c99a365fd7dea95d5f8c8986c7d0a0646 Mon Sep 17 00:00:00 2001 From: slguan Date: Thu, 11 Jul 2019 19:02:45 +0800 Subject: [PATCH] Handling invalid connections when deleting a database --- src/rpc/src/trpc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/rpc/src/trpc.c b/src/rpc/src/trpc.c index 4c16ada51c..31b6f8f94d 100644 --- a/src/rpc/src/trpc.c +++ b/src/rpc/src/trpc.c @@ -503,6 +503,10 @@ int taosGetRpcConn(int chann, int sid, char *meterId, STaosRpc *pServer, SRpcCon } pConn = pChann->connList + sid; + if (pChann == NULL || pChann->connList == NULL) { + tTrace("%s cid:%d sid:%d, connlist is null, received:%s", pServer->label, chann, sid, meterId); + return TSDB_CODE_MISMATCHED_METER_ID; + } if (pConn->signature == NULL) { memset(pConn, 0, sizeof(SRpcConn));