mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2026-10-05 14:38:23 +00:00
fix "<forced-ping>" mismatch.
fixes https://github.com/nbd-wtf/nostr-tools/issues/539
This commit is contained in:
@@ -670,11 +670,13 @@ export class Subscription {
|
|||||||
this.relay.openSubs.delete(this.id)
|
this.relay.openSubs.delete(this.id)
|
||||||
|
|
||||||
// compute idleness state
|
// compute idleness state
|
||||||
|
if (!this.id.startsWith('<forced-ping>')) {
|
||||||
this.relay.ongoingOperations--
|
this.relay.ongoingOperations--
|
||||||
if (this.relay.ongoingOperations === 0) {
|
if (this.relay.ongoingOperations === 0) {
|
||||||
this.relay.idleSince = Date.now()
|
this.relay.idleSince = Date.now()
|
||||||
this.relay.scheduleIdleClose()
|
this.relay.scheduleIdleClose()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.onclose?.(reason)
|
this.onclose?.(reason)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user