diff options
author | 2015-01-16 09:53:39 -0800 | |
---|---|---|
committer | 2015-01-16 09:53:39 -0800 | |
commit | 7b01878736840395f13244bd68edaf0d88b4c3e4 (patch) | |
tree | 62157ae945af04cef92bfd50106552ad8d78a491 /src/core/surface | |
parent | 19cdb35a2cb229dbf14f0163f090c11427a8f797 (diff) |
Fix returned status
The client should return status deadline exceeded when the deadline is
exceeded (not cancelled status)
Diffstat (limited to 'src/core/surface')
-rw-r--r-- | src/core/surface/call.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); } |