diff --git a/src/db/events.ts b/src/db/events.ts index a20c650..79f670f 100644 --- a/src/db/events.ts +++ b/src/db/events.ts @@ -257,6 +257,7 @@ async function getEvents( filters: DittoFilter[], opts: GetEventsOpts = {}, ): Promise[]> { + if (opts.signal?.aborted) return Promise.resolve([]); if (!filters.length) return Promise.resolve([]); debug('REQ', JSON.stringify(filters)); let query = getEventsQuery(filters);