db/events: respect the signal
This commit is contained in:
parent
f665c5f825
commit
e341ec7b36
|
@ -257,6 +257,7 @@ async function getEvents<K extends number>(
|
|||
filters: DittoFilter<K>[],
|
||||
opts: GetEventsOpts = {},
|
||||
): Promise<DittoEvent<K>[]> {
|
||||
if (opts.signal?.aborted) return Promise.resolve([]);
|
||||
if (!filters.length) return Promise.resolve([]);
|
||||
debug('REQ', JSON.stringify(filters));
|
||||
let query = getEventsQuery(filters);
|
||||
|
|
Loading…
Reference in New Issue