mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2026-08-08 23:34:41 +00:00
fix "<forced-ping>" mismatch.
fixes https://github.com/nbd-wtf/nostr-tools/issues/539
This commit is contained in:
+6
-4
@@ -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('<forced-ping>')) {
|
||||
this.relay.ongoingOperations--
|
||||
if (this.relay.ongoingOperations === 0) {
|
||||
this.relay.idleSince = Date.now()
|
||||
this.relay.scheduleIdleClose()
|
||||
}
|
||||
}
|
||||
|
||||
this.onclose?.(reason)
|
||||
|
||||
Reference in New Issue
Block a user