diff options
author | Craig Tiller <ctiller@google.com> | 2016-05-19 11:28:41 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-05-19 11:28:41 -0700 |
commit | 3eee9b4ace38ca348fd45029e4544213e8760842 (patch) | |
tree | b1635efe95e7720660b93d03145ec70fe925f27b /src | |
parent | db7c35635b9013f3844d6abbd30a81d0b481677f (diff) |
Mark sync cq as non-listening when it is
Diffstat (limited to 'src')
-rw-r--r-- | src/cpp/server/server.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index f955a31494..854057efbc 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -295,7 +295,12 @@ Server::Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned, grpc_channel_args channel_args; args->SetChannelArgs(&channel_args); server_ = grpc_server_create(&channel_args, nullptr); - grpc_server_register_completion_queue(server_, cq_.cq(), nullptr); + if (thread_pool_ == nullptr) { + grpc_server_register_non_listening_completion_queue(server_, cq_.cq(), + nullptr); + } else { + grpc_server_register_completion_queue(server_, cq_.cq(), nullptr); + } } Server::~Server() { |