Skip to content

Decouple LSPS4 webhooks from liquidity loop#22

Merged
amackillop merged 1 commit intolsp-0.7.0from
austin_fire-and-forget-webhook-request
Apr 21, 2026
Merged

Decouple LSPS4 webhooks from liquidity loop#22
amackillop merged 1 commit intolsp-0.7.0from
austin_fire-and-forget-webhook-request

Conversation

@amackillop
Copy link
Copy Markdown

Send LSPS4 wake-up webhooks in the background instead of awaiting the HTTP response on the liquidity event loop.

Direct webhook delivery was meant to reduce wake-up latency, but waiting for the response made unrelated liquidity work depend on the client's webhook handler. When that handler keeps the request open while the node wakes and starts processing payments, follow-up actions such as opening a channel can be delayed behind the webhook.

Keep a long timeout on the background request as cleanup for genuinely stuck connections. The timeout is not part of LSPS4 control flow; it is there to bound resource usage while still treating the webhook as best-effort.

Send LSPS4 wake-up webhooks in the background instead of awaiting the
HTTP response on the liquidity event loop.

Direct webhook delivery was meant to reduce wake-up latency, but waiting
for the response made unrelated liquidity work depend on the client's
webhook handler. When that handler keeps the request open while the
node wakes and starts processing payments, follow-up actions such as
opening a channel can be delayed behind the webhook.

Keep a long timeout on the background request as cleanup for genuinely
stuck connections. The timeout is not part of LSPS4 control flow; it is
there to bound resource usage while still treating the webhook as
best-effort.
@amackillop amackillop merged commit cc7b358 into lsp-0.7.0 Apr 21, 2026
6 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants