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
ae2b02a5
Commit
ae2b02a5
authored
5 years ago
by
yang-g
Browse files
Options
Downloads
Patches
Plain Diff
Support client side handshaker handoff fd
parent
9940819d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/ext/transport/chttp2/client/chttp2_connector.cc
+17
-10
17 additions, 10 deletions
src/core/ext/transport/chttp2/client/chttp2_connector.cc
with
17 additions
and
10 deletions
src/core/ext/transport/chttp2/client/chttp2_connector.cc
+
17
−
10
View file @
ae2b02a5
...
...
@@ -139,20 +139,22 @@ void Chttp2Connector::OnHandshakeDone(void* arg, grpc_error* error) {
error
=
GRPC_ERROR_CREATE_FROM_STATIC_STRING
(
"connector shutdown"
);
// We were shut down after handshaking completed successfully, so
// destroy the endpoint here.
// TODO(ctiller): It is currently necessary to shutdown endpoints
// before destroying them, even if we know that there are no
// pending read/write callbacks. This should be fixed, at which
// point this can be removed.
grpc_endpoint_shutdown
(
args
->
endpoint
,
GRPC_ERROR_REF
(
error
));
grpc_endpoint_destroy
(
args
->
endpoint
);
grpc_channel_args_destroy
(
args
->
args
);
grpc_slice_buffer_destroy_internal
(
args
->
read_buffer
);
gpr_free
(
args
->
read_buffer
);
if
(
args
->
endpoint
!=
nullptr
)
{
// TODO(ctiller): It is currently necessary to shutdown endpoints
// before destroying them, even if we know that there are no
// pending read/write callbacks. This should be fixed, at which
// point this can be removed.
grpc_endpoint_shutdown
(
args
->
endpoint
,
GRPC_ERROR_REF
(
error
));
grpc_endpoint_destroy
(
args
->
endpoint
);
grpc_channel_args_destroy
(
args
->
args
);
grpc_slice_buffer_destroy_internal
(
args
->
read_buffer
);
gpr_free
(
args
->
read_buffer
);
}
}
else
{
error
=
GRPC_ERROR_REF
(
error
);
}
self
->
result_
->
Reset
();
}
else
{
}
else
if
(
args
->
endpoint
!=
nullptr
)
{
grpc_endpoint_delete_from_pollset_set
(
args
->
endpoint
,
self
->
args_
.
interested_parties
);
self
->
result_
->
transport
=
...
...
@@ -187,6 +189,11 @@ void Chttp2Connector::OnHandshakeDone(void* arg, grpc_error* error) {
grpc_chttp2_transport_start_reading
(
self
->
result_
->
transport
,
args
->
read_buffer
,
nullptr
);
self
->
result_
->
channel_args
=
args
->
args
;
}
else
{
// If the handshaking succeeded but there is no endpoint, then the
// handshaker may have handed off the connection to some external
// code. Just verify that exit_early flag is set.
GPR_DEBUG_ASSERT
(
args
->
exit_early
);
}
grpc_closure
*
notify
=
self
->
notify_
;
self
->
notify_
=
nullptr
;
...
...
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