未验证 提交 3a20447b 编写于 作者: D dapan1121 提交者: GitHub

Merge pull request #17351 from taosdata/fix/TD-19544

fix: fix kill query crash issue
...@@ -222,7 +222,9 @@ void taos_kill_query(TAOS *taos) { ...@@ -222,7 +222,9 @@ void taos_kill_query(TAOS *taos) {
int64_t rid = *(int64_t *)taos; int64_t rid = *(int64_t *)taos;
STscObj *pTscObj = acquireTscObj(rid); STscObj *pTscObj = acquireTscObj(rid);
stopAllRequests(pTscObj->pRequests); if (pTscObj) {
stopAllRequests(pTscObj->pRequests);
}
releaseTscObj(rid); releaseTscObj(rid);
} }
......
...@@ -998,7 +998,9 @@ void *shellCancelHandler(void *arg) { ...@@ -998,7 +998,9 @@ void *shellCancelHandler(void *arg) {
shell.stop_query = true; shell.stop_query = true;
} else { } else {
#endif #endif
taos_kill_query(shell.conn); if (shell.conn) {
taos_kill_query(shell.conn);
}
#ifdef WEBSOCKET #ifdef WEBSOCKET
} }
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册