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
8bf5fc88
Commit
8bf5fc88
authored
9 years ago
by
Yang Gao
Browse files
Options
Downloads
Plain Diff
Merge pull request #1373 from ctiller/shutdown
Fix early shutdown
parents
c5a6394e
1fb99552
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/grpc++/client_context.h
+4
-1
4 additions, 1 deletion
include/grpc++/client_context.h
src/cpp/client/channel.cc
+1
-1
1 addition, 1 deletion
src/cpp/client/channel.cc
src/cpp/client/channel.h
+1
-0
1 addition, 0 deletions
src/cpp/client/channel.h
with
6 additions
and
2 deletions
include/grpc++/client_context.h
+
4
−
1
View file @
8bf5fc88
...
...
@@ -35,6 +35,7 @@
#define GRPCXX_CLIENT_CONTEXT_H
#include
<map>
#include
<memory>
#include
<string>
#include
<grpc/support/log.h>
...
...
@@ -126,9 +127,10 @@ class ClientContext {
friend
class
::
grpc
::
ClientAsyncResponseReader
;
grpc_call
*
call
()
{
return
call_
;
}
void
set_call
(
grpc_call
*
call
)
{
void
set_call
(
grpc_call
*
call
,
const
std
::
shared_ptr
<
ChannelInterface
>&
channel
)
{
GPR_ASSERT
(
call_
==
nullptr
);
call_
=
call
;
channel_
=
channel
;
}
grpc_completion_queue
*
cq
()
{
return
cq_
;
}
...
...
@@ -137,6 +139,7 @@ class ClientContext {
grpc
::
string
authority
()
{
return
authority_
;
}
bool
initial_metadata_received_
;
std
::
shared_ptr
<
ChannelInterface
>
channel_
;
grpc_call
*
call_
;
grpc_completion_queue
*
cq_
;
gpr_timespec
deadline_
;
...
...
This diff is collapsed.
Click to expand it.
src/cpp/client/channel.cc
+
1
−
1
View file @
8bf5fc88
...
...
@@ -71,7 +71,7 @@ Call Channel::CreateCall(const RpcMethod& method, ClientContext* context,
:
context
->
authority
().
c_str
(),
context
->
raw_deadline
());
GRPC_TIMER_MARK
(
CALL_CREATED
,
c_call
);
context
->
set_call
(
c_call
);
context
->
set_call
(
c_call
,
shared_from_this
()
);
return
Call
(
c_call
,
this
,
cq
);
}
...
...
This diff is collapsed.
Click to expand it.
src/cpp/client/channel.h
+
1
−
0
View file @
8bf5fc88
...
...
@@ -51,6 +51,7 @@ class Credentials;
class
StreamContextInterface
;
class
Channel
GRPC_FINAL
:
public
GrpcLibrary
,
public
std
::
enable_shared_from_this
<
Channel
>
,
public
ChannelInterface
{
public:
Channel
(
const
grpc
::
string
&
target
,
grpc_channel
*
c_channel
);
...
...
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