| Index: runtime/bin/socket_win.cc
|
| diff --git a/runtime/bin/socket_win.cc b/runtime/bin/socket_win.cc
|
| index e53a28d832da28db66224d69fcc9442309472390..ec547654c7c3a34756de86312187923fb89a6188 100644
|
| --- a/runtime/bin/socket_win.cc
|
| +++ b/runtime/bin/socket_win.cc
|
| @@ -142,13 +142,11 @@ intptr_t Socket::Connect(intptr_t fd, RawAddr addr, const intptr_t port) {
|
| SocketHandle* handle = reinterpret_cast<SocketHandle*>(fd);
|
| SOCKET s = handle->socket();
|
| SocketAddress::SetAddrPort(&addr, port);
|
| - status = connect(
|
| - s,
|
| - &addr.addr,
|
| - SocketAddress::GetAddrLength(addr));
|
| + int status = connect(s, &addr.addr, SocketAddress::GetAddrLength(addr));
|
| if (status == SOCKET_ERROR) {
|
| DWORD rc = WSAGetLastError();
|
| - handle->close();
|
| + ClientSocket* client_socket = reinterpret_cast<ClientSocket*>(fd);
|
| + client_socket->Close();
|
| SetLastError(rc);
|
| return -1;
|
| }
|
|
|