use lnd event emitter from correct scope
This commit is contained in:
parent
d0e15eb887
commit
77080f5acd
|
@ -19,7 +19,7 @@ function subscribeForever (subscribe) {
|
||||||
let sub
|
let sub
|
||||||
try {
|
try {
|
||||||
return await new Promise((resolve, reject) => {
|
return await new Promise((resolve, reject) => {
|
||||||
const sub = subscribe(resolve, bail)
|
sub = subscribe(resolve, bail)
|
||||||
if (!sub) {
|
if (!sub) {
|
||||||
return bail(new Error('function passed to subscribeForever must return a subscription object or promise'))
|
return bail(new Error('function passed to subscribeForever must return a subscription object or promise'))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue