Skip to content

Commit

Permalink
routerrpc: only log TrackPayment error if err is not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
ellemouton committed Jan 24, 2025
1 parent af8c8b4 commit e3b94e4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lnrpc/routerrpc/router_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1343,12 +1343,17 @@ func (s *Server) trackPayment(subscription routing.ControlTowerSubscriber,
err := s.trackPaymentStream(
stream.Context(), subscription, noInflightUpdates, stream.Send,
)
switch {
case err == nil:
return nil

// If the context is canceled, we don't return an error.
if errors.Is(err, context.Canceled) {
case errors.Is(err, context.Canceled):
log.Infof("Payment stream %v canceled", identifier)

return nil

default:
}

// Otherwise, we will log and return the error as the stream has
Expand Down

0 comments on commit e3b94e4

Please sign in to comment.