Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break on empty events when loading from remote (#2376)
currently we only stop querying for events when the provider no longer returns a continuation token. this pr adds an extra safety net to stop immediately when there are no more events being returned. though the spec mentions explicitly that the token Should not appear if there are no more pages. but it doesn't mention exactly how the token should behave with pending block as the list of events in the pending block could still grow. there could be a case where someone calls getEvents with the the to block sets to=pending. if they already reach the end of the pending block during the first call, yet the block could still emit new events. but if the returned continuation token is nil, then if the user wants to continue from the last events in the first call, they couldn't and had to start from the beginning again.
- Loading branch information