Skip to content
Snippets Groups Projects
Commit 67bfefdb authored by Craig Tiller's avatar Craig Tiller
Browse files

Ensure call alarms are cancelled when the underlying stream closes

parent 6d42a73b
No related branches found
No related tags found
No related merge requests found
...@@ -727,6 +727,10 @@ static void call_on_done_recv(void *pc, int success) { ...@@ -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 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment