attempt to fix sporadic windows c-ares crash (#25726)

pull/25153/head
apolcyn 4 years ago committed by GitHub
parent df73c74f99
commit 3d0990f029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc

@ -362,6 +362,8 @@ class GrpcPolledFdWindows {
DWORD bytes_sent = 0; DWORD bytes_sent = 0;
int wsa_error_code = 0; int wsa_error_code = 0;
if (SendWriteBuf(&bytes_sent, nullptr, &wsa_error_code) != 0) { if (SendWriteBuf(&bytes_sent, nullptr, &wsa_error_code) != 0) {
grpc_slice_unref_internal(write_buf_);
write_buf_ = grpc_empty_slice();
wsa_error_ctx->SetWSAError(wsa_error_code); wsa_error_ctx->SetWSAError(wsa_error_code);
char* msg = gpr_format_message(wsa_error_code); char* msg = gpr_format_message(wsa_error_code);
GRPC_CARES_TRACE_LOG( GRPC_CARES_TRACE_LOG(

Loading…
Cancel
Save