From 48821e0f56b4d589f7f4f71dd33cf4f9502220b3 Mon Sep 17 00:00:00 2001 From: Bomin Zhang Date: Mon, 15 Jun 2020 15:54:54 +0800 Subject: [PATCH] fix td-572 --- src/client/src/tscAsync.c | 4 +++- src/client/src/tscUtil.c | 2 -- src/rpc/src/rpcMain.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/src/tscAsync.c b/src/client/src/tscAsync.c index c61402192d..f4fad42719 100644 --- a/src/client/src/tscAsync.c +++ b/src/client/src/tscAsync.c @@ -368,7 +368,9 @@ void tscProcessAsyncRes(SSchedMsg *pMsg) { pSql->fp = pSql->fetchFp; } - (*pSql->fp)(pSql->param, taosres, code); + if (pSql->fp) { + (*pSql->fp)(pSql->param, taosres, code); + } if (shouldFree) { tscTrace("%p sqlObj is automatically freed in async res", pSql); diff --git a/src/client/src/tscUtil.c b/src/client/src/tscUtil.c index 57634e73fd..b1f5a99b67 100644 --- a/src/client/src/tscUtil.c +++ b/src/client/src/tscUtil.c @@ -1451,8 +1451,6 @@ bool tscShouldBeFreed(SSqlObj* pSql) { return false; } - assert(pSql->fp != NULL); - STscObj* pTscObj = pSql->pTscObj; if (pSql->pStream != NULL || pTscObj->pHb == pSql || pSql->pSubscription != NULL) { return false; diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index dcbcae452d..f05416c0cd 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -924,7 +924,7 @@ static void *rpcProcessMsgFromPeer(SRecvInfo *pRecv) { // underlying UDP layer does not know it is server or client pRecv->connType = pRecv->connType | pRpc->connType; - if (pRecv->ip == 0) { + if (pRecv->msg == NULL) { rpcProcessBrokenLink(pConn); return NULL; } -- GitLab