Commit 905adb8
committed
withdraw: check error from RegisterSpendNtfn before using channels
handleWithdrawal did not check the error returned by
RegisterSpendNtfn before spawning a goroutine to read from the
notification channels. If registration failed, spentChan would be nil
and the goroutine would block forever on a nil channel read.
Add the missing error check so the function returns early on
registration failure.1 parent cae5914 commit 905adb8
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
679 | 682 | | |
680 | 683 | | |
681 | 684 | | |
| |||
0 commit comments