Skip to content

Commit

Permalink
chore: catch tcp error 49 on macos (#323)
Browse files Browse the repository at this point in the history
  • Loading branch information
manekinekko authored Dec 28, 2023
1 parent 0790981 commit 9c28f4a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/preview2-shim/lib/nodejs/sockets/tcp-socket-impl.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,13 @@ export class TcpSocket {
});

if (err) {
// TODO: figure out what these error mean and why it is thrown
assert(err === -89, "-89"); // on macos
// The remote address has changed.
// TODO: what error should be thrown for EREMCHG?
assert(err === -89, "unknown"); // on macos

// The calling host cannot reach the specified destination.
// TODO: what error should be thrown for EADDRNOTAVAIL?
assert(err === -49, "unknown"); // on macos

assert(err === -99, "ephemeral-ports-exhausted");
assert(err === -101, "remote-unreachable"); // wsl ubuntu
Expand Down

0 comments on commit 9c28f4a

Please sign in to comment.