add last error for windows as well

This commit is contained in:
Lion Kortlepel
2020-11-12 01:56:50 +01:00
parent cde41f01b2
commit 80c5341650
+3 -1
View File
@@ -30,7 +30,9 @@ bool Send(SOCKET TCPSock,std::string Data){
Data.clear(); Data.clear();
if (BytesSent <= 0) { if (BytesSent <= 0) {
#ifndef WIN32 #ifndef WIN32
error(__func__ + std::string(strerror(errno))); error(__func__ + std::string(" ") + strerror(errno));
#else
error(__func__ + std::string(" ") + std::to_string(WSAGetLastError()));
#endif // WIN32 #endif // WIN32
return false; return false;
} }