diff --git a/src/node_net.cc b/src/node_net.cc index a74e2dcef0..f958744cd0 100644 --- a/src/node_net.cc +++ b/src/node_net.cc @@ -437,7 +437,7 @@ static Handle GetPeerName(const Arguments& args) { int r = getpeername(fd, (struct sockaddr *) &address_storage, &len); if (r < 0) { - return ThrowException(ErrnoException(errno, "getsockname")); + return ThrowException(ErrnoException(errno, "getpeername")); } Local info = Object::New(); @@ -970,7 +970,7 @@ static Handle SendTo(const Arguments& args) { if (written < 0) { if (errno == EAGAIN || errno == EINTR) return Null(); - return ThrowException(ErrnoException(errno, "sendmsg")); + return ThrowException(ErrnoException(errno, "sendto")); } /* Note that the FD isn't explicitly closed here, this