mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-22 19:01:18 -04:00
Update bench_httpclient.c
*fixed: socket_geterror instead of WSAGetLastError
This commit is contained in:
parent
4e9325e8dc
commit
cb96931236
@ -151,10 +151,7 @@ launch_request(void)
|
|||||||
}
|
}
|
||||||
frob_socket(sock);
|
frob_socket(sock);
|
||||||
if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) < 0) {
|
if (connect(sock, (struct sockaddr*)&sin, sizeof(sin)) < 0) {
|
||||||
int e = errno;
|
int e = evutil_socket_geterror(sock);
|
||||||
#ifdef _WIN32
|
|
||||||
e = WSAGetLastError();
|
|
||||||
#endif
|
|
||||||
if (! EVUTIL_ERR_CONNECT_RETRIABLE(e)) {
|
if (! EVUTIL_ERR_CONNECT_RETRIABLE(e)) {
|
||||||
evutil_closesocket(sock);
|
evutil_closesocket(sock);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user