summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKrishna Rajendran <krishna@emptybox.org>2010-03-14 23:24:29 -0400
committerRyan Dahl <ry@tinyclouds.org>2010-03-14 23:08:45 -0700
commit0d5a1fed33134d05911a153ade2bf8ae8710fc57 (patch)
tree17239a2310dac1cb694efe8f9117dff52a43420a
parent004faf384690aa67cfd377e6ebcfd1667d5f2489 (diff)
downloadnode-0d5a1fed33134d05911a153ade2bf8ae8710fc57.tar.gz
Use gai_strerror when tcp.Server fails to resolve its address or service.
-rw-r--r--src/node_net.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_net.cc b/src/node_net.cc
index bc0f67315..2c5b8de32 100644
--- a/src/node_net.cc
+++ b/src/node_net.cc
@@ -837,7 +837,7 @@ Handle<Value> Server::Listen(const Arguments& args) {
host : NULL, *port, &server_tcp_hints, &address_list);
if (r != 0) {
- Local<Value> exception = Exception::Error(String::New(strerror(errno)));
+ Local<Value> exception = Exception::Error(String::New(gai_strerror(r)));
return ThrowException(exception);
}