Skip to content

Commit e3b94e4

Browse files
committed
routerrpc: only log TrackPayment error if err is not nil
1 parent af8c8b4 commit e3b94e4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lnrpc/routerrpc/router_server.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,12 +1343,17 @@ func (s *Server) trackPayment(subscription routing.ControlTowerSubscriber,
13431343
err := s.trackPaymentStream(
13441344
stream.Context(), subscription, noInflightUpdates, stream.Send,
13451345
)
1346+
switch {
1347+
case err == nil:
1348+
return nil
13461349

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

13511354
return nil
1355+
1356+
default:
13521357
}
13531358

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

0 commit comments

Comments
 (0)