File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1763,6 +1763,7 @@ out:
17631763func (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
You can’t perform that action at this time.
0 commit comments