Closed andreashuber69 closed 1 year ago
None of them throw an error event?
None of them throw an error event?
You mean when calling subscribeToBlocks
while LND is down, for example? I did not test that. I trust that it would throw.
I only tested calling subscribeToBlocks
when LND is still up. I then call on
on the returned emitter and finally restart LND after subscribing. Since the docs do not mention a separate error event, I did not try to subscribe to that. After restarting LND I did not get any "block"
events anymore. I guess that is as designed, I was just wondering whether there's an easier way to detect that I need to resubscribe?
all of the subscriptions have error events, i would hook onto that
all of the subscriptions have error events, i would hook onto that
Indeed, an "error"
event is emitted when LND shuts down. Thanks!
As far as I my tests indicate, the emitters created by at least some of the
subscribeTo...
functions will quietly stop working when LND restarts. So I guess I need to periodically monitor that LND is still alive and resubscribe when I detect that LND has restarted?