Replace all timeouts with AbortSignal

This commit is contained in:
Alex Gleason
2023-12-22 10:38:48 -06:00
parent 6d6e3bcecc
commit ad0aaf97dd
10 changed files with 35 additions and 40 deletions

View File

@@ -64,7 +64,7 @@ async function storeEvent(event: Event, data: EventData): Promise<void> {
if (data.user || isAdminEvent(event) || await isLocallyFollowed(event.pubkey)) {
const [deletion] = await mixer.getFilters(
[{ kinds: [5], authors: [event.pubkey], '#e': [event.id], limit: 1 }],
{ limit: 1, timeout: Time.seconds(1) },
{ limit: 1, signal: AbortSignal.timeout(Time.seconds(1)) },
);
if (deletion) {