multi: terminate SubscribeSingleInvoice once completed

This commit is contained in:
carla committed 2021-04-14 09:19:23 +02:00
1 parent 0686329062
commit db1d671b1a
3 files changed
+19

No files matched your search

+6
View File
@@ -247,6 +247,12 @@ func (s *Server) SubscribeSingleInvoice(req *SubscribeSingleInvoiceRequest,
return err
}
// If we have reached a terminal state, close the
// stream with no error.
if newInvoice.State.IsFinal() {
return nil
}
case <-s.quit:
return nil
}