Skip to content

Commit 13f5bf1

Browse files
committed
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.
1 parent d4ebc84 commit 13f5bf1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

node-net/net.mts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ export class NodeLDKNet {
8282
socket.on("close", function() {
8383
this_pm.socket_disconnected(descriptor);
8484
});
85+
socket.on("error", function() {
86+
this_pm.socket_disconnected(descriptor);
87+
});
8588

8689
return descriptor;
8790
}

0 commit comments

Comments
 (0)