Skip to content

Commit 90ad2ec

Browse files
Merge pull request #180 from hieblmi/fix-shutdown-panic
challanger: fix shutdown panic
2 parents 770cb04 + 735dd3f commit 90ad2ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

challenger/lnd.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,9 @@ func (l *LndChallenger) readInvoiceStream(
270270

271271
// Stop shuts down the challenger.
272272
func (l *LndChallenger) Stop() {
273-
l.invoicesCancel()
273+
if l.invoicesCancel != nil {
274+
l.invoicesCancel()
275+
}
274276
close(l.quit)
275277
l.wg.Wait()
276278
}

0 commit comments

Comments
 (0)