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)
|
emitter.emit(SubscriptionEvent.Send)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
emitter.emit(SubscriptionEvent.Send)
|
||||||
onComplete()
|
onComplete()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,9 @@ export class Nip46Broker extends Emitter {
|
|||||||
while (this.#queue.length > 0) {
|
while (this.#queue.length > 0) {
|
||||||
const [{method, params, resolve}] = this.#queue.splice(0, 1)
|
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 {
|
} finally {
|
||||||
this.#processing = false
|
this.#processing = false
|
||||||
|
|||||||
Reference in New Issue
Block a user