Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
48bc4767
Commit
48bc4767
authored
8 years ago
by
Craig Tiller
Browse files
Options
Downloads
Patches
Plain Diff
Eliminate cancellation if we never sent an op down
parent
6517333d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/lib/surface/call.c
+3
-1
3 additions, 1 deletion
src/core/lib/surface/call.c
with
3 additions
and
1 deletion
src/core/lib/surface/call.c
+
3
−
1
View file @
48bc4767
...
@@ -161,6 +161,7 @@ struct grpc_call {
...
@@ -161,6 +161,7 @@ struct grpc_call {
bool
receiving_message
;
bool
receiving_message
;
bool
requested_final_op
;
bool
requested_final_op
;
bool
received_final_op
;
bool
received_final_op
;
bool
sent_any_op
;
/* have we received initial metadata */
/* have we received initial metadata */
bool
has_initial_md_been_received
;
bool
has_initial_md_been_received
;
...
@@ -488,7 +489,7 @@ void grpc_call_destroy(grpc_call *c) {
...
@@ -488,7 +489,7 @@ void grpc_call_destroy(grpc_call *c) {
gpr_mu_lock
(
&
c
->
mu
);
gpr_mu_lock
(
&
c
->
mu
);
GPR_ASSERT
(
!
c
->
destroy_called
);
GPR_ASSERT
(
!
c
->
destroy_called
);
c
->
destroy_called
=
1
;
c
->
destroy_called
=
1
;
cancel
=
!
c
->
received_final_op
;
cancel
=
c
->
sent_any_op
&&
!
c
->
received_final_op
;
gpr_mu_unlock
(
&
c
->
mu
);
gpr_mu_unlock
(
&
c
->
mu
);
if
(
cancel
)
{
if
(
cancel
)
{
cancel_with_error
(
&
exec_ctx
,
c
,
STATUS_FROM_API_OVERRIDE
,
cancel_with_error
(
&
exec_ctx
,
c
,
STATUS_FROM_API_OVERRIDE
,
...
@@ -1678,6 +1679,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
...
@@ -1678,6 +1679,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx,
grpc_closure_init
(
&
bctl
->
finish_batch
,
finish_batch
,
bctl
,
grpc_closure_init
(
&
bctl
->
finish_batch
,
finish_batch
,
bctl
,
grpc_schedule_on_exec_ctx
);
grpc_schedule_on_exec_ctx
);
stream_op
->
on_complete
=
&
bctl
->
finish_batch
;
stream_op
->
on_complete
=
&
bctl
->
finish_batch
;
call
->
sent_any_op
=
true
;
gpr_mu_unlock
(
&
call
->
mu
);
gpr_mu_unlock
(
&
call
->
mu
);
execute_op
(
exec_ctx
,
call
,
stream_op
);
execute_op
(
exec_ctx
,
call
,
stream_op
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment