mirror of https://github.com/lightninglabs/loop
loopin: handle EOF case for SubscribeSingleInvoice
From lnd 0.13.0, the SubscribeSingleInvoice rpc will return an EOF once it has served a final state to the stream. This is handled in our lndclient wrapper by closing the channels that we send updates/ errors on. When we are exclusively consuming updates from these streams, we don't need to handle this case because we will receive our final update and exit. However, in the case where we continue to listen on the update channels after consuming the final update, we need to handle this EOF/closed channels case. This is done by setting the channels to nil after they're closed so that we no longer select on them but can continue waiting for our other cases to complete. We have similar handling in loopout's waitForHtlcSpendConfirmed.pull/396/head
parent
7dca93fd88
commit
0e72c2bf92
Loading…
Reference in New Issue