diff options
| author | Adam Soltys <[email protected]> | 2026-05-17 23:50:53 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-05-17 23:50:53 -0700 |
| commit | c0f087a9102ef325eab146832055da7ec2ee3220 (patch) | |
| tree | 967995b4f36c86d83f335570f375902b9272c5dc /scripts | |
| parent | 7c1eefc142c951d7db5a0fa1afeae64a2fdf02fd (diff) | |
| download | coinos-server-c0f087a9102ef325eab146832055da7ec2ee3220.tar.gz coinos-server-c0f087a9102ef325eab146832055da7ec2ee3220.zip | |
handle socket-level errors that bypass Bun's JS error path
Two related defenses around the CLN unix socket connection:
- Global net.Socket.prototype.connect patch: when Bun's
net.createConnection is called on a non-existent unix socket, the
ENOENT it throws bypasses all JS error handlers and crashes the
process. existsSync-check the path first; if missing, emit a normal
'error' event so the caller can handle it gracefully.
- lightningProxy: existsSync gate before constructing LightningClient,
plus a client.on("error") listener that clears the cached client on
socket-died errors instead of letting the unhandled event take down
the process.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
