Give more detailed error messages for connection failure.
This commit is contained in:
parent
c4286dc6ee
commit
013df1cc3b
1 changed files with 5 additions and 1 deletions
|
@ -9,6 +9,10 @@
|
||||||
#include "init.h"
|
#include "init.h"
|
||||||
#include "strlcpy.h"
|
#include "strlcpy.h"
|
||||||
|
|
||||||
|
#ifdef __WXMSW__
|
||||||
|
#include <string.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef USE_UPNP
|
#ifdef USE_UPNP
|
||||||
#include <miniupnpc/miniwget.h>
|
#include <miniupnpc/miniwget.h>
|
||||||
#include <miniupnpc/miniupnpc.h>
|
#include <miniupnpc/miniupnpc.h>
|
||||||
|
@ -148,7 +152,7 @@ bool ConnectSocket(const CAddress& addrConnect, SOCKET& hSocketRet, int nTimeout
|
||||||
}
|
}
|
||||||
if (nRet != 0)
|
if (nRet != 0)
|
||||||
{
|
{
|
||||||
printf("connect() failed after select(): %i\n",nRet);
|
printf("connect() failed after select(): %s\n",strerror(nRet));
|
||||||
closesocket(hSocket);
|
closesocket(hSocket);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue