diff options
author | 2015-04-30 09:32:37 -0700 | |
---|---|---|
committer | 2015-04-30 09:32:37 -0700 | |
commit | 67bfefdbd13fa1f8370d0da33ef52612fa338038 (patch) | |
tree | b77775d78017f9c0de09f668c8d6514a9093ee60 | |
parent | 6d42a73bb984e19eb1bf84e2a952eec861cea464 (diff) |
Ensure call alarms are cancelled when the underlying stream closes
-rw-r--r-- | src/core/surface/call.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/surface/call.c b/src/core/surface/call.c index 6ca1b4e9a1..50333eac17 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -727,6 +727,10 @@ static void call_on_done_recv(void *pc, int success) { if (call->recv_state == GRPC_STREAM_CLOSED) { GPR_ASSERT(call->read_state <= READ_STATE_STREAM_CLOSED); call->read_state = READ_STATE_STREAM_CLOSED; + if (call->have_alarm) { + grpc_alarm_cancel(&call->alarm); + call->have_alarm = 0; + } } finish_read_ops(call); } else { |