RTL/backend
saubyk 19aa332d61 Address review: protect the fire-and-forget channel close from the timeout
LND's DELETE /v1/channels/{channelPoint} streams until the closing tx
confirms, routinely longer than the wrapper's 10-minute bound. The
close call in closeChannel is fire-and-forget (202 returned
immediately, no .catch), so the timeout rejection would have become an
unhandled promise rejection and crashed the process ~10 minutes after
any close that had not yet confirmed. request-promise returned
Bluebird promises whose unhandled rejections only warned, which is why
this never crashed before.

The close now uses a copy of the options with timeout: 0 (same
treatment as the invoice/payment subscriptions) and a .catch that logs
through handleError - errors were never surfaced to the HTTP response
anyway, but logging beats Bluebird's silent warning. This was the only
call site without a rejection handler.

Verified on the fixture: opened a disposable 200k alice->bob channel
via RTL, closed it (202, gone from open and listed in closed after
mining), then requested a close for a bogus channel point - LND
rejects the stream, the catch logs the error (no auth headers in it),
and the process stays up. Read suite re-passes.
2026-07-19 22:01:23 -07:00
..
controllers Address review: protect the fire-and-forget channel close from the timeout 2026-07-19 22:01:23 -07:00
models Add Disable Authentication option in the backend 2026-07-19 22:01:23 -07:00
routes Update project code according to dependencies update 2026-02-01 09:06:07 -08:00
utils Address review: exempt LND subscription streams from the request timeout 2026-07-19 22:01:23 -07:00