From 013df1cc3b1f441b9e4361fdf5574d0b2af1812b Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 2 Jul 2011 03:59:37 +0200 Subject: [PATCH] Give more detailed error messages for connection failure. --- src/net.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/net.cpp b/src/net.cpp index e8422a53..23b40f97 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -9,6 +9,10 @@ #include "init.h" #include "strlcpy.h" +#ifdef __WXMSW__ +#include +#endif + #ifdef USE_UPNP #include #include @@ -148,7 +152,7 @@ bool ConnectSocket(const CAddress& addrConnect, SOCKET& hSocketRet, int nTimeout } if (nRet != 0) { - printf("connect() failed after select(): %i\n",nRet); + printf("connect() failed after select(): %s\n",strerror(nRet)); closesocket(hSocket); return false; }