diff --git a/packages/adapter-rx-nostr/src/adapter.ts b/packages/adapter-rx-nostr/src/adapter.ts index e7de658..402dea6 100644 --- a/packages/adapter-rx-nostr/src/adapter.ts +++ b/packages/adapter-rx-nostr/src/adapter.ts @@ -144,7 +144,10 @@ export class RxNostrAdapter implements NostrFetcherBackend { resetAutoAbortTimer(); tx.send(event); }, - complete: () => tx.close(), + complete: () => { + closeSub(); + tx.close(); + }, }); const noticeSub = this.#rxNostr diff --git a/packages/examples/src/interop/relayPoolTs.ts b/packages/examples/src/interop/relayPoolTs.ts index 591a31f..638c0a5 100644 --- a/packages/examples/src/interop/relayPoolTs.ts +++ b/packages/examples/src/interop/relayPoolTs.ts @@ -5,7 +5,7 @@ import { RelayPool } from "nostr-relaypool"; import { defaultRelays, nHoursAgo } from "../utils"; const main = async () => { - // initialize fetcher based on nostr-relaypool's `RelayPool` + // initialize fetcher based on nostr-relaypool's RelayPool const pool = new RelayPool(); const fetcher = NostrFetcher.withCustomPool(relayPoolAdapter(pool)); diff --git a/packages/examples/src/interop/rxNostr.ts b/packages/examples/src/interop/rxNostr.ts index 41eaba9..7d4c5cf 100644 --- a/packages/examples/src/interop/rxNostr.ts +++ b/packages/examples/src/interop/rxNostr.ts @@ -6,7 +6,7 @@ import "websocket-polyfill"; import { defaultRelays, nHoursAgo } from "../utils"; const main = async () => { - // initialize fetcher based on nostr-relaypool's `RelayPool` + // initialize fetcher based on RxNostr const rxNostr = createRxNostr(); const fetcher = NostrFetcher.withCustomPool(rxNostrAdapter(rxNostr)); diff --git a/packages/examples/src/interop/simplePool.ts b/packages/examples/src/interop/simplePool.ts index 28d183c..5266892 100644 --- a/packages/examples/src/interop/simplePool.ts +++ b/packages/examples/src/interop/simplePool.ts @@ -6,7 +6,7 @@ import "websocket-polyfill"; import { defaultRelays, nHoursAgo } from "../utils"; const main = async () => { - // initialize fetcher based on nostr-tools `SimplePool` + // initialize fetcher based on nostr-tools SimplePool const pool = new SimplePool(); const fetcher = NostrFetcher.withCustomPool(simplePoolAdapter(pool));