diff --git a/src/client/src/tscStream.c b/src/client/src/tscStream.c index 63459a5979ef4545a1e3c56048bebdf236ce1e9b..e2e7c7cdb3102a49a2d8b6e9583631708a72b296 100644 --- a/src/client/src/tscStream.c +++ b/src/client/src/tscStream.c @@ -752,7 +752,7 @@ TAOS_STREAM *taos_open_stream(TAOS *taos, const char *sqlstr, void (*fp)(void *p void taos_close_stream(TAOS_STREAM *handle) { SSqlStream *pStream = (SSqlStream *)handle; - SSqlObj *pSql = (SSqlObj *)atomic_exchange_ptr(&pStream->pSql, 0); + SSqlObj *pSql = pStream->pSql; if (pSql == NULL) { return; }