rpcserver+lnrpc: make Subscribe RPCs context aware

This commit makes all the Subscribe RCP's context aware so that they
stop executing when the request context is cancelled.
This commit is contained in:
whythat authored and Elle Mouton committed 2021-04-22 07:49:29 +02:00
1 parent 8f940a5ea3
commit 1adeb41a9d
3 files changed
+29

No files matched your search

+3
View File
@@ -253,6 +253,9 @@ func (s *Server) SubscribeSingleInvoice(req *SubscribeSingleInvoiceRequest,
return nil
}
case <-updateStream.Context().Done():
return updateStream.Context().Err()
case <-s.quit:
return nil
}