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
c3555ce6
Commit
c3555ce6
authored
10 years ago
by
Nicolas Noble
Browse files
Options
Downloads
Plain Diff
Merge pull request #705 from ctiller/fd_shutdown
Fix a double-close in the server code.
parents
8883e94e
d75fe665
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/surface/server.c
+1
-1
1 addition, 1 deletion
src/core/surface/server.c
src/core/transport/chttp2_transport.c
+4
-0
4 additions, 0 deletions
src/core/transport/chttp2_transport.c
with
5 additions
and
1 deletion
src/core/surface/server.c
+
1
−
1
View file @
c3555ce6
...
@@ -291,7 +291,7 @@ static void orphan_channel(channel_data *chand) {
...
@@ -291,7 +291,7 @@ static void orphan_channel(channel_data *chand) {
static
void
finish_destroy_channel
(
void
*
cd
,
int
success
)
{
static
void
finish_destroy_channel
(
void
*
cd
,
int
success
)
{
channel_data
*
chand
=
cd
;
channel_data
*
chand
=
cd
;
grpc_server
*
server
=
chand
->
server
;
grpc_server
*
server
=
chand
->
server
;
grpc_channel_
destroy
(
chand
->
channel
);
grpc_channel_
internal_unref
(
chand
->
channel
);
server_unref
(
server
);
server_unref
(
server
);
}
}
...
...
This diff is collapsed.
Click to expand it.
src/core/transport/chttp2_transport.c
+
4
−
0
View file @
c3555ce6
...
@@ -191,6 +191,7 @@ struct transport {
...
@@ -191,6 +191,7 @@ struct transport {
gpr_uint8
writing
;
gpr_uint8
writing
;
gpr_uint8
calling_back
;
gpr_uint8
calling_back
;
gpr_uint8
destroying
;
gpr_uint8
destroying
;
gpr_uint8
closed
;
error_state
error_state
;
error_state
error_state
;
/* stream indexing */
/* stream indexing */
...
@@ -416,6 +417,7 @@ static void init_transport(transport *t, grpc_transport_setup_callback setup,
...
@@ -416,6 +417,7 @@ static void init_transport(transport *t, grpc_transport_setup_callback setup,
t
->
next_stream_id
=
is_client
?
1
:
2
;
t
->
next_stream_id
=
is_client
?
1
:
2
;
t
->
last_incoming_stream_id
=
0
;
t
->
last_incoming_stream_id
=
0
;
t
->
destroying
=
0
;
t
->
destroying
=
0
;
t
->
closed
=
0
;
t
->
is_client
=
is_client
;
t
->
is_client
=
is_client
;
t
->
outgoing_window
=
DEFAULT_WINDOW
;
t
->
outgoing_window
=
DEFAULT_WINDOW
;
t
->
incoming_window
=
DEFAULT_WINDOW
;
t
->
incoming_window
=
DEFAULT_WINDOW
;
...
@@ -521,6 +523,8 @@ static void destroy_transport(grpc_transport *gt) {
...
@@ -521,6 +523,8 @@ static void destroy_transport(grpc_transport *gt) {
static
void
close_transport
(
grpc_transport
*
gt
)
{
static
void
close_transport
(
grpc_transport
*
gt
)
{
transport
*
t
=
(
transport
*
)
gt
;
transport
*
t
=
(
transport
*
)
gt
;
gpr_mu_lock
(
&
t
->
mu
);
gpr_mu_lock
(
&
t
->
mu
);
GPR_ASSERT
(
!
t
->
closed
);
t
->
closed
=
1
;
if
(
t
->
ep
)
{
if
(
t
->
ep
)
{
grpc_endpoint_shutdown
(
t
->
ep
);
grpc_endpoint_shutdown
(
t
->
ep
);
}
}
...
...
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