aboutsummaryrefslogtreecommitdiff
path: root/src/netbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r--src/netbase.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp
index 276b2f4dc2..5be3fe34f8 100644
--- a/src/netbase.cpp
+++ b/src/netbase.cpp
@@ -572,7 +572,7 @@ bool HaveNameProxy() {
bool IsProxy(const CNetAddr &addr) {
LOCK(cs_proxyInfos);
for (int i = 0; i < NET_MAX; i++) {
- if (addr == (CNetAddr)proxyInfo[i].proxy)
+ if (addr == static_cast<CNetAddr>(proxyInfo[i].proxy))
return true;
}
return false;
@@ -682,6 +682,9 @@ bool CloseSocket(SOCKET& hSocket)
#else
int ret = close(hSocket);
#endif
+ if (ret) {
+ LogPrintf("Socket close failed: %d. Error: %s\n", hSocket, NetworkErrorString(WSAGetLastError()));
+ }
hSocket = INVALID_SOCKET;
return ret != SOCKET_ERROR;
}