diff --git a/source/libs/transport/src/transCli.c b/source/libs/transport/src/transCli.c index 126b6cb91f..842b5a1b4b 100644 --- a/source/libs/transport/src/transCli.c +++ b/source/libs/transport/src/transCli.c @@ -844,7 +844,10 @@ void transSendRequest(void* shandle, const char* ip, uint32_t port, STransMsg* p pCtx->ip = strdup(ip); pCtx->port = port; pCtx->hThrdIdx = index; - pCtx->appCtx = *ctx; + + if (ctx != NULL) { + pCtx->appCtx = *ctx; + } assert(pTransInst->connType == TAOS_CONN_CLIENT); // atomic or not