From a1c69e5a0728db3c9713625f373b3a727f2aa642 Mon Sep 17 00:00:00 2001 From: dapan1121 <89396746@qq.com> Date: Fri, 2 Apr 2021 18:21:19 +0800 Subject: [PATCH] fix taosd crash issue --- src/cq/src/cqMain.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cq/src/cqMain.c b/src/cq/src/cqMain.c index d4a874c97a..f620eb4dd5 100644 --- a/src/cq/src/cqMain.c +++ b/src/cq/src/cqMain.c @@ -326,8 +326,10 @@ void *cqCreate(void *handle, uint64_t uid, int32_t sid, const char* dstTable, ch pObj->rid = taosAddRef(cqObjRef, pObj); - if(start) { + if(start && pContext->master) { cqCreateStream(pContext, pObj); + } else { + pObj->pContext = pContext; } rid = pObj->rid; -- GitLab