mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 18:10:48 +02:00
routerrpc: add verbose log and ignore context canceled error
This commit is contained in:
@ -872,10 +872,17 @@ func (s *Server) trackPayment(subscription routing.ControlTowerSubscriber,
|
|||||||
stream.Context(), subscription, noInflightUpdates, stream.Send,
|
stream.Context(), subscription, noInflightUpdates, stream.Send,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// If the context is canceled, we don't return an error.
|
||||||
if errors.Is(err, context.Canceled) {
|
if errors.Is(err, context.Canceled) {
|
||||||
log.Debugf("Payment stream %v canceled", identifier)
|
log.Infof("Payment stream %v canceled", identifier)
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Otherwise, we will log and return the error as the stream has
|
||||||
|
// received an error from the payment lifecycle.
|
||||||
|
log.Errorf("TrackPayment got error for payment %x: %v", identifier, err)
|
||||||
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user