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

Ensure server is alive when we free requested calls

parent 42b6c93c
No related branches found
No related tags found
No related merge requests found
......@@ -1271,6 +1271,8 @@ static void done_request_event(void *req, grpc_cq_completion *c) {
} else {
gpr_free(req);
}
server_unref(server);
}
static void fail_call(grpc_server *server, requested_call *rc) {
......@@ -1283,6 +1285,7 @@ static void fail_call(grpc_server *server, requested_call *rc) {
rc->data.registered.initial_metadata->count = 0;
break;
}
server_ref(server);
grpc_cq_end_op(rc->cq_for_notification, rc->tag, 0, done_request_event, rc,
&rc->completion);
}
......@@ -1293,6 +1296,8 @@ static void publish_registered_or_batch(grpc_call *call, int success,
grpc_call_stack_element(grpc_call_get_call_stack(call), 0);
requested_call *rc = prc;
call_data *calld = elem->call_data;
channel_data *chand = elem->channel_data;
server_ref(chand->server);
grpc_cq_end_op(calld->cq_new, rc->tag, success, done_request_event, rc,
&rc->completion);
GRPC_CALL_INTERNAL_UNREF(call, "server", 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment