Merge pull request #1428 from ctiller/the-call-is-dead-stop-kicking-it

Ensure call alarms are cancelled when the underlying stream closes
pull/1442/head
Nicolas Noble 10 years ago
commit 70e299f2eb
  1. 4
      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) { if (call->recv_state == GRPC_STREAM_CLOSED) {
GPR_ASSERT(call->read_state <= READ_STATE_STREAM_CLOSED); GPR_ASSERT(call->read_state <= READ_STATE_STREAM_CLOSED);
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); finish_read_ops(call);
} else { } else {

Loading…
Cancel
Save