Update bench_httpclient.c

*fixed: socket_geterror instead of WSAGetLastError
This commit is contained in:
Seungmo Koo 2015-06-07 15:51:15 +09:00
parent 4e9325e8dc
commit cb96931236

View File

@ -151,10 +151,7 @@ launch_request(void)
}
frob_socket(sock);
if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) < 0) {
int e = errno;
#ifdef _WIN32
e = WSAGetLastError();
#endif
int e = evutil_socket_geterror(sock);
if (! EVUTIL_ERR_CONNECT_RETRIABLE(e)) {
evutil_closesocket(sock);
return -1;