diff --git a/src/node_net.cc b/src/node_net.cc index 5b39ae23bd..dad2906d64 100644 --- a/src/node_net.cc +++ b/src/node_net.cc @@ -821,6 +821,14 @@ Handle Server::Listen(const Arguments& args) { if (address_list) freeaddrinfo(address_list); + if (server->server_.errorno) { + Local e = Exception::Error( + String::NewSymbol(strerror(server->server_.errorno))); + Local obj = e->ToObject(); + obj->Set(String::NewSymbol("errno"), Integer::New(server->server_.errorno)); + return ThrowException(e); + } + return Undefined(); }