From 7b01878736840395f13244bd68edaf0d88b4c3e4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 16 Jan 2015 09:53:39 -0800 Subject: Fix returned status The client should return status deadline exceeded when the deadline is exceeded (not cancelled status) --- src/core/surface/call.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/core/surface') diff --git a/src/core/surface/call.c b/src/core/surface/call.c index db6dbe04e4..fd4e590aad 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -897,8 +897,13 @@ grpc_metadata_buffer *grpc_call_get_metadata_buffer(grpc_call *call) { static void call_alarm(void *arg, int success) { grpc_call *call = arg; if (success) { + if (call->is_client) { + grpc_call_cancel_with_status(call, GRPC_STATUS_DEADLINE_EXCEEDED, + "Deadline Exceeded"); + } else { grpc_call_cancel(call); } + } grpc_call_internal_unref(call); } -- cgit v1.2.3