Emit send, even when it doesn't happen
This commit is contained in:
@@ -316,6 +316,7 @@ const _executeSubscription = (sub: Subscription) => {
|
||||
emitter.emit(SubscriptionEvent.Send)
|
||||
})
|
||||
} else {
|
||||
emitter.emit(SubscriptionEvent.Send)
|
||||
onComplete()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,9 @@ export class Nip46Broker extends Emitter {
|
||||
while (this.#queue.length > 0) {
|
||||
const [{method, params, resolve}] = this.#queue.splice(0, 1)
|
||||
|
||||
this.request(method, params).then(resolve)
|
||||
this.request(method, params).then(resolve, error => {
|
||||
console.error(`Failed to send nip46 request`, {method, params, error})
|
||||
})
|
||||
}
|
||||
} finally {
|
||||
this.#processing = false
|
||||
|
||||
Reference in New Issue
Block a user