diff --git a/src/client/src/tscSql.c b/src/client/src/tscSql.c index ac7081ba700cfd9a65069e5d268ea7157ca3727b..acc38ac8ed5be82d0c0df19445e98bb47128589f 100644 --- a/src/client/src/tscSql.c +++ b/src/client/src/tscSql.c @@ -698,8 +698,10 @@ void taos_stop_query(TAOS_RES *res) { tscKillSTableQuery(pSql); } else { if (pSql->cmd.command < TSDB_SQL_LOCAL) { - assert(pSql->pRpcCtx != NULL); - rpcCancelRequest(pSql->pRpcCtx); + if (pSql->pRpcCtx != NULL) { + rpcCancelRequest(pSql->pRpcCtx); + pSql->pRpcCtx = NULL; + } } }