projects
/
ldk-java
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d4ebc84
)
Handle socket errors (the same as socket closure)
author
Matt Corallo
<git@bluematt.me>
Mon, 15 Aug 2022 15:24:52 +0000
(15:24 +0000)
committer
Matt Corallo
<git@bluematt.me>
Mon, 15 Aug 2022 15:24:52 +0000
(15:24 +0000)
`gr0kchain` on Discord reported that not handling "error" causes
us to get unhandled exceptions, so we have to handle it.
node-net/net.mts
patch
|
blob
|
history
diff --git
a/node-net/net.mts
b/node-net/net.mts
index 58da387d6c59177c363e2777f31091079558caf4..797bc7a7a47907920d9b00039d643cd82cd21133 100644
(file)
--- 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("close", function() {
this_pm.socket_disconnected(descriptor);
});
+ socket.on("error", function() {
+ this_pm.socket_disconnected(descriptor);
+ });
return descriptor;
}
return descriptor;
}