Merge pull request #8745 from kpayson64/sigpipe_handle

Return status unavailable (over internal) on EPIPE
pull/9019/head
kpayson64 8 years ago committed by GitHub
commit a98778f33d
  1. 5
      src/core/lib/iomgr/tcp_posix.c

@ -373,6 +373,11 @@ static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) {
tcp->outgoing_slice_idx = unwind_slice_idx;
tcp->outgoing_byte_idx = unwind_byte_idx;
return false;
} else if (errno == EPIPE) {
*error = grpc_error_set_int(GRPC_OS_ERROR(errno, "sendmsg"),
GRPC_ERROR_INT_GRPC_STATUS,
GRPC_STATUS_UNAVAILABLE);
return true;
} else {
*error = tcp_annotate_error(GRPC_OS_ERROR(errno, "sendmsg"), tcp);
return true;

Loading…
Cancel
Save