From 73910bd343d898ec33c400ea7b0322d56ab1a249 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 31 Oct 2013 14:03:58 +0100 Subject: [PATCH] Fixed socket error reporting. --- lib/socket.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/socket.cpp b/lib/socket.cpp index ad27fc19..6b87157f 100644 --- a/lib/socket.cpp +++ b/lib/socket.cpp @@ -533,8 +533,9 @@ int Socket::Connection::iwrite(const void * buffer, int len){ default: if (errno != EPIPE){ Error = true; + remotehost = strerror(errno); #if DEBUG >= 2 - fprintf(stderr, "Could not iwrite data! Error: %s\n", strerror(errno)); + fprintf(stderr, "Could not iwrite data! Error: %s\n", remotehost.c_str()); #endif } close(); @@ -572,8 +573,9 @@ int Socket::Connection::iread(void * buffer, int len){ default: if (errno != EPIPE){ Error = true; + remotehost = strerror(errno); #if DEBUG >= 2 - fprintf(stderr, "Could not iread data! Error: %s\n", strerror(errno)); + fprintf(stderr, "Could not iread data! Error: %s\n", remotehost.c_str()); #endif } close();