Skip to content
Browse files

Give more detailed error messages for connection failure.

  • Loading branch information...
1 parent c4286dc commit 013df1cc3b1f441b9e4361fdf5574d0b2af1812b @TheBlueMatt committed Jul 2, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/net.cpp
View
6 src/net.cpp
@@ -9,6 +9,10 @@
#include "init.h"
#include "strlcpy.h"
+#ifdef __WXMSW__
+#include <string.h>
+#endif
+
#ifdef USE_UPNP
#include <miniupnpc/miniwget.h>
#include <miniupnpc/miniupnpc.h>
@@ -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;
}

0 comments on commit 013df1c

Please sign in to comment.
Something went wrong with that request. Please try again.