Skip to content

Commit

Permalink
Merge pull request #25503 from taosdata/fix/TS-4718
Browse files Browse the repository at this point in the history
fix:[TS-4718]pMsg->data is null
  • Loading branch information
dapan1121 committed Apr 29, 2024
2 parents 0b4f515 + 07291a7 commit 511e0de
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/client/src/clientTmq.c
Expand Up @@ -1356,6 +1356,11 @@ int32_t tmqPollCb(void* param, SDataBuf* pMsg, int32_t code) {
goto END;
}

if(pMsg->pData == NULL){
tscError("consumer:0x%" PRIx64 " msg discard from vgId:%d, since msg is NULL", tmq->consumerId, vgId);
goto FAIL;
}

int32_t msgEpoch = ((SMqRspHead*)pMsg->pData)->epoch;
int32_t clientEpoch = atomic_load_32(&tmq->epoch);
if (msgEpoch < clientEpoch) {
Expand Down

0 comments on commit 511e0de

Please sign in to comment.