Fix incorrect usage of strerror_r

This commit is contained in:
2021-12-09 14:55:56 -05:00
parent 46f38b8360
commit 3b0e52ae86

View File

@@ -108,8 +108,7 @@ public:
return sock; return sock;
error_errno: error_errno:
strerror_r(errno, errbuf, 1024); err = strerror_r(errno, errbuf, 1024);
err = errbuf;
error: error:
if (sock != INVALID_SOCKET) close(sock); if (sock != INVALID_SOCKET) close(sock);
if (addrs != nullptr) freeaddrinfo(addrs); if (addrs != nullptr) freeaddrinfo(addrs);