aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-04-30 17:03:03 -0700
committerGravatar Nicolas Noble <nicolasnoble@users.noreply.github.com>2015-04-30 17:03:03 -0700
commit70e299f2ebe052bc3b17c4422f0b81380b0b7858 (patch)
tree51f65b8219fe7783c2204fce5dd3973863528a94
parent51fe022db0441e376139064429004fcd664e8f88 (diff)
parent67bfefdbd13fa1f8370d0da33ef52612fa338038 (diff)
Merge pull request #1428 from ctiller/the-call-is-dead-stop-kicking-it
Ensure call alarms are cancelled when the underlying stream closes
-rw-r--r--src/core/surface/call.c4
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 {