aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr
diff options
context:
space:
mode:
authorGravatar Ken Payson <kpayson@google.com>2016-11-14 10:10:47 -0800
committerGravatar Ken Payson <kpayson@google.com>2016-11-14 10:10:47 -0800
commit1b1a86028c21dddc42a9debb38fc8314661fe5f5 (patch)
treeacc81bdbf00caee190cc0a9edc92f5d42cb7b0d4 /src/core/lib/iomgr
parent4736c55e0f923b8f3b8713449500a43ab8686ae3 (diff)
Return status unavailable (over internal) on EPIPE
Diffstat (limited to 'src/core/lib/iomgr')
-rw-r--r--src/core/lib/iomgr/tcp_posix.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c
index 880af93ee1..6a13c7be51 100644
--- a/src/core/lib/iomgr/tcp_posix.c
+++ b/src/core/lib/iomgr/tcp_posix.c
@@ -380,6 +380,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 = GRPC_OS_ERROR(errno, "sendmsg");
return true;