From 0292dea847920c728e7b0c51eef8e938c6da52fa Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 15 Jul 2009 17:52:11 +0200 Subject: [PATCH] Better error output for socket errors. Temporary. --- src/net.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/net.h b/src/net.h index 47f6967c65..6c641be372 100644 --- a/src/net.h +++ b/src/net.h @@ -6,6 +6,8 @@ #include #include +#include + namespace node { class Server; @@ -95,7 +97,7 @@ private: connection->OnDisconnect(); if (s->errorno) { - printf("socket died with error %d\n", s->errorno); + printf("socket died: %s\n", strerror(s->errorno)); } assert(connection->attached_);