fix or slow down windows socket leak

related issue
https://github.com/grpc/grpc/issues/13519
https://github.com/grpc/grpc/issues/13102
pull/13743/head
Junsung Ko 7 years ago committed by Jan Tattermusch
parent ada05afd62
commit b66c7d1e7d
  1. 1
      src/core/lib/iomgr/tcp_client_windows.cc

@ -104,6 +104,7 @@ static void on_connect(grpc_exec_ctx* exec_ctx, void* acp, grpc_error* error) {
GPR_ASSERT(transfered_bytes == 0); GPR_ASSERT(transfered_bytes == 0);
if (!wsa_success) { if (!wsa_success) {
error = GRPC_WSA_ERROR(WSAGetLastError(), "ConnectEx"); error = GRPC_WSA_ERROR(WSAGetLastError(), "ConnectEx");
closesocket(socket->socket);
} else { } else {
*ep = *ep =
grpc_tcp_create(exec_ctx, socket, ac->channel_args, ac->addr_name); grpc_tcp_create(exec_ctx, socket, ac->channel_args, ac->addr_name);

Loading…
Cancel
Save