mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-28 01:32:27 +02:00
routerrpc: add verbose log and ignore context canceled error
This commit is contained in:
parent
58677569b5
commit
6de21b2a02
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user