lncli: remove error logs

This commit is contained in:
ErikEk committed 2021-09-06 19:12:43 +02:00
1 parent e76c4c0e9b
commit 195e57025b
3 files changed
+47 -3

No files matched your search

+37 -3
View File
@@ -2920,7 +2920,13 @@ func (r *rpcServer) SubscribePeerEvents(req *lnrpc.PeerEventSubscription,
return err
}
// The response stream's context for whatever reason has been
// closed. If context is closed by an exceeded deadline we will
// return an error.
case <-eventStream.Context().Done():
if errors.Is(eventStream.Context().Err(), context.Canceled) {
return nil
}
return eventStream.Context().Err()
case <-r.quit:
@@ -4210,7 +4216,13 @@ func (r *rpcServer) SubscribeChannelEvents(req *lnrpc.ChannelEventSubscription,
return err
}
// The response stream's context for whatever reason has been
// closed. If context is closed by an exceeded deadline we will
// return an error.
case <-updateStream.Context().Done():
if errors.Is(updateStream.Context().Err(), context.Canceled) {
return nil
}
return updateStream.Context().Err()
case <-r.quit:
@@ -5158,7 +5170,13 @@ func (r *rpcServer) SubscribeInvoices(req *lnrpc.InvoiceSubscription,
return err
}
// The response stream's context for whatever reason has been
// closed. If context is closed by an exceeded deadline we will
// return an error.
case <-updateStream.Context().Done():
if errors.Is(updateStream.Context().Err(), context.Canceled) {
return nil
}
return updateStream.Context().Err()
case <-r.quit:
@@ -5219,8 +5237,14 @@ func (r *rpcServer) SubscribeTransactions(req *lnrpc.GetTransactionsRequest,
return err
}
// The response stream's context for whatever reason has been
// closed. If context is closed by an exceeded deadline we will
// return an error.
case <-updateStream.Context().Done():
rpcsLog.Infof("Cancelling transaction subscription")
rpcsLog.Infof("Canceling transaction subscription")
if errors.Is(updateStream.Context().Err(), context.Canceled) {
return nil
}
return updateStream.Context().Err()
case <-r.quit:
@@ -5761,9 +5785,13 @@ func (r *rpcServer) SubscribeChannelGraph(req *lnrpc.GraphTopologySubscription,
return err
}
// The context was cancelled so we report a cancellation error
// and exit immediately.
// The response stream's context for whatever reason has been
// closed. If context is closed by an exceeded deadline
// we will return an error.
case <-updateStream.Context().Done():
if errors.Is(updateStream.Context().Err(), context.Canceled) {
return nil
}
return updateStream.Context().Err()
// The server is quitting, so we'll exit immediately. Returning
@@ -6688,7 +6716,13 @@ func (r *rpcServer) SubscribeChannelBackups(req *lnrpc.ChannelBackupSubscription
return err
}
// The response stream's context for whatever reason has been
// closed. If context is closed by an exceeded deadline we will
// return an error.
case <-updateStream.Context().Done():
if errors.Is(updateStream.Context().Err(), context.Canceled) {
return nil
}
return updateStream.Context().Err()
case <-r.quit: