mirror of
https://github.com/lightninglabs/loop.git
synced 2026-08-13 12:33:03 +02:00
SweepHtlcTimeoutAction used a select with a default case containing a blocking time.After. When the context was canceled, it logged the error but continued the retry loop instead of returning. The default case also meant that ctx.Done was only checked when it was already signaled, while an hour-long sleep blocked without listening for cancellation. Replace the default+time.After pattern with a proper select on both ctx.Done and time.After so the function exits promptly on shutdown. |
||
|---|---|---|
| .. | ||
| address | ||
| deposit | ||
| loopin | ||
| openchannel | ||
| script | ||
| staticutil | ||
| version | ||
| withdraw | ||
| log.go | ||