From: Matt Corallo Date: Mon, 15 Aug 2022 15:24:52 +0000 (+0000) Subject: Handle socket errors (the same as socket closure) X-Git-Tag: v0.0.110.3~1^2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=13f5bf1de0bfaeda8b846c2c2e10d16aaefdbffb;p=ldk-java 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. --- 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; }