mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-23 04:54:30 +00:00
Merge pull request #374 from TheBlueMatt/neterror
Give more detailed error messages for connection failure.
This commit is contained in:
commit
1a19fc17b2
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user