diff options
author | Chris Wilson <chris+github@qwirx.com> | 2007-06-28 20:54:28 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2007-06-28 20:54:28 +0000 |
commit | 7c581bcb685e99e37b64752b1e85330765e3be0f (patch) | |
tree | 3576a7e38f9aa07afc89ebe8be7bea388249d083 /lib | |
parent | 592d1e26597202ce0eed301d61981823cd7084f9 (diff) |
Log reasons for failure to connect to a socket.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/server/SocketStream.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/server/SocketStream.cpp b/lib/server/SocketStream.cpp index 61d3846f..ebc57041 100644 --- a/lib/server/SocketStream.cpp +++ b/lib/server/SocketStream.cpp @@ -15,6 +15,7 @@ #include <sys/types.h> #include <errno.h> +#include <string.h> #ifndef WIN32 #include <poll.h> @@ -164,6 +165,10 @@ void SocketStream::Open(int Type, const char *Name, int Port) #else ::close(mSocketHandle); #endif + BOX_ERROR("Failed to connect to socket (type " << Type << + ", name " << Name << ", port " << Port << "): " << + "error " << errno << " (" << strerror(errno) << + ")"); mSocketHandle = INVALID_SOCKET_VALUE; THROW_EXCEPTION(ConnectionException, Conn_SocketConnectError) } |