Skip to content

Commit

Permalink
emit error when connect fails on net.Socket
Browse files Browse the repository at this point in the history
  • Loading branch information
cirospaciari committed Jul 2, 2023
1 parent e087569 commit d4b6924
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/node/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ const Socket = (function (InternalSocket) {
unix: path,
socket: Socket.#Handlers,
tls,
}).catch((error) => {
this.emit("error", error);
});
} else {
// default start
Expand All @@ -499,6 +501,8 @@ const Socket = (function (InternalSocket) {
port: port,
socket: Socket.#Handlers,
tls,
}).catch((error) => {
this.emit("error", error);
});
}
return this;
Expand Down

0 comments on commit d4b6924

Please sign in to comment.