fix(stream): check return values.
This commit is contained in:
parent
00e02280b8
commit
3892a98e2e
|
@ -144,11 +144,21 @@ void streamQueueNextItemInSourceQ(SStreamQueue* pQueue, SStreamQueueItem** pItem
|
||||||
|
|
||||||
// let's try the ordinary input q
|
// let's try the ordinary input q
|
||||||
pQueue->qItem = NULL;
|
pQueue->qItem = NULL;
|
||||||
(void)taosGetQitem(pQueue->qall, &pQueue->qItem);
|
int32_t code = taosGetQitem(pQueue->qall, &pQueue->qItem);
|
||||||
|
if (code) {
|
||||||
|
stError("s-task:%s failed to get item in inputq, code:%s", id, tstrerror(code));
|
||||||
|
}
|
||||||
|
|
||||||
if (pQueue->qItem == NULL) {
|
if (pQueue->qItem == NULL) {
|
||||||
(void)taosReadAllQitems(pQueue->pQueue, pQueue->qall);
|
code = taosReadAllQitems(pQueue->pQueue, pQueue->qall);
|
||||||
(void)taosGetQitem(pQueue->qall, &pQueue->qItem);
|
if (code) {
|
||||||
|
stError("s-task:%s failed to get all items in inputq, code:%s", id, tstrerror(code));
|
||||||
|
}
|
||||||
|
|
||||||
|
code = taosGetQitem(pQueue->qall, &pQueue->qItem);
|
||||||
|
if (code) {
|
||||||
|
stError("s-task:%s failed to get item in inputq, code:%s", id, tstrerror(code));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*pItem = streamQueueCurItem(pQueue);
|
*pItem = streamQueueCurItem(pQueue);
|
||||||
|
|
Loading…
Reference in New Issue