Skip to content
Snippets Groups Projects
Commit a98778f3 authored by kpayson64's avatar kpayson64 Committed by GitHub
Browse files

Merge pull request #8745 from kpayson64/sigpipe_handle

Return status unavailable (over internal) on EPIPE
parents cf9e317e 1b1a8602
No related branches found
No related tags found
No related merge requests found
...@@ -373,6 +373,11 @@ static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) { ...@@ -373,6 +373,11 @@ static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) {
tcp->outgoing_slice_idx = unwind_slice_idx; tcp->outgoing_slice_idx = unwind_slice_idx;
tcp->outgoing_byte_idx = unwind_byte_idx; tcp->outgoing_byte_idx = unwind_byte_idx;
return false; 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 { } else {
*error = tcp_annotate_error(GRPC_OS_ERROR(errno, "sendmsg"), tcp); *error = tcp_annotate_error(GRPC_OS_ERROR(errno, "sendmsg"), tcp);
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment