From 7ebe2e5b309ce272f4053a9615f4a71ce35fde9a Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Wed, 30 Apr 2025 00:07:04 -0300 Subject: [PATCH] loopout: close sweepbatcher quitChan This is needed because sweepbatcher can use this channel in multiple select statements to unblock itself if the caller cancels. --- loopout.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopout.go b/loopout.go index f7da0de6..6fc74091 100644 --- a/loopout.go +++ b/loopout.go @@ -1147,7 +1147,7 @@ func (s *loopOutSwap) waitForHtlcSpendConfirmedV2(globalCtx context.Context, quitChan := make(chan bool, 1) defer func() { - quitChan <- true + close(quitChan) }() notifier := sweepbatcher.SpendNotifier{