From 13f5bf1de0bfaeda8b846c2c2e10d16aaefdbffb Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 15 Aug 2022 15:24:52 +0000 Subject: [PATCH] Handle socket errors (the same as socket closure) `gr0kchain` on Discord reported that not handling "error" causes us to get unhandled exceptions, so we have to handle it. --- node-net/net.mts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/node-net/net.mts b/node-net/net.mts index 58da387d..797bc7a7 100644 --- a/node-net/net.mts +++ b/node-net/net.mts @@ -82,6 +82,9 @@ export class NodeLDKNet { socket.on("close", function() { this_pm.socket_disconnected(descriptor); }); + socket.on("error", function() { + this_pm.socket_disconnected(descriptor); + }); return descriptor; } -- 2.39.5