Skip to content

Commit 1a18ed4

Browse files
committed
htlcswitch: fix linter warnings
1 parent a0e619e commit 1a18ed4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

htlcswitch/switch.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1763,6 +1763,7 @@ out:
17631763
func (s *Switch) Start() error {
17641764
if !atomic.CompareAndSwapInt32(&s.started, 0, 1) {
17651765
log.Warn("Htlc Switch already started")
1766+
17661767
return errors.New("htlc switch already started")
17671768
}
17681769

@@ -1783,19 +1784,23 @@ func (s *Switch) Start() error {
17831784
err = fmt.Errorf("unable to start htlc forwarder: %w",
17841785
ErrSwitchExiting)
17851786
log.Errorf("%v", err)
1787+
17861788
return err
17871789
}
17881790

17891791
if err := s.reforwardResponses(); err != nil {
1790-
s.Stop()
1792+
// We are already stopping so we can ignore the error.
1793+
_ = s.Stop()
17911794
log.Errorf("unable to reforward responses: %v", err)
1795+
17921796
return err
17931797
}
17941798

17951799
if err := s.reforwardResolutions(); err != nil {
17961800
// We are already stopping so we can ignore the error.
17971801
_ = s.Stop()
17981802
log.Errorf("unable to reforward resolutions: %v", err)
1803+
17991804
return err
18001805
}
18011806

0 commit comments

Comments
 (0)