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:
1 parent
8f940a5ea3
commit
1adeb41a9d
3 files changed
+29
No files matched your search
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user