Closed MrHash closed 4 years ago
Hey @MrHash, what's your usage look like? Methods that return a stream shouldn't be awaited.
Looks like this. The first stream works fine, the second hangs.
const invoicesSubscriber = await lnd.lnrpc.subscribeInvoices({});
invoicesSubscriber.on('data', (invoice) => {
console.log(invoice);
});
const htlcSubscriber = await lnd.routerrpc.subscribeHtlcEvents({});
htlcSubscriber.on('data', (event) => {
console.log(event);
});
if i don't use await on the second call i get the error UnhandledPromiseRejectionWarning: TypeError: htlcSubscriber.on is not a function
Thanks, looking into this.
@MrHash A fix has been published in v0.10.0-beta.0
Excellent, working fine now.
Not sure why but cannot await this endpoint on the router rpc, node just hangs.
subscribeInvoices()
on invoices rpc works fine. Please advise.