bugfix for when limit=0

This commit is contained in:
Doug Hoyte
2023-05-19 15:15:47 -04:00
parent 799da2c016
commit 2c6852ecf9

View File

@ -324,6 +324,8 @@ struct DBQuery : NonCopyable {
uint64_t startTime = hoytech::curr_time_us();
bool complete = scanner->scan(txn, [&](uint64_t levId, std::string_view eventPayload){
if (f.limit == 0) return true;
// If this event came in after our query began, don't send it. It will be sent after the EOSE.
if (levId > sub.latestEventId) return false;