From 7fa1ef45c562d607ffc7d72289c08cbfc44f5343 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Wed, 29 Jul 2026 16:43:47 -0300 Subject: [PATCH] fix "" mismatch. fixes https://github.com/nbd-wtf/nostr-tools/issues/539 --- abstract-relay.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/abstract-relay.ts b/abstract-relay.ts index 44f19dc..66430d0 100644 --- a/abstract-relay.ts +++ b/abstract-relay.ts @@ -670,10 +670,12 @@ export class Subscription { this.relay.openSubs.delete(this.id) // compute idleness state - this.relay.ongoingOperations-- - if (this.relay.ongoingOperations === 0) { - this.relay.idleSince = Date.now() - this.relay.scheduleIdleClose() + if (!this.id.startsWith('')) { + this.relay.ongoingOperations-- + if (this.relay.ongoingOperations === 0) { + this.relay.idleSince = Date.now() + this.relay.scheduleIdleClose() + } } this.onclose?.(reason)