aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-05-20 10:00:04 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-05-20 10:00:04 -0700
commit0e314bccff92d2f455550e55a3a3df9c94774be4 (patch)
treeb9cabc8fba6b9440d68c16d521bc134e48f770d9 /src
parentaae6c2cb961a3cbf8fe2681a7316a270af7bf718 (diff)
parentfa92da7deca46cd525068789ba0680cb210bae8a (diff)
Merge branch 'server_channel_affinity' of github.com:sreecha/grpc into test_affine
Diffstat (limited to 'src')
-rw-r--r--src/cpp/server/server_builder.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc
index dd7e86b12c..391932c88e 100644
--- a/src/cpp/server/server_builder.cc
+++ b/src/cpp/server/server_builder.cc
@@ -100,11 +100,8 @@ void ServerBuilder::AddListeningPort(const grpc::string& addr,
std::unique_ptr<Server> ServerBuilder::BuildAndStart() {
std::unique_ptr<ThreadPoolInterface> thread_pool;
- // Does this server have atleast one sync method
- bool has_sync_methods = false;
for (auto it = services_.begin(); it != services_.end(); ++it) {
if ((*it)->service->has_synchronous_methods()) {
- has_sync_methods = true;
if (thread_pool == nullptr) {
thread_pool.reset(CreateDefaultThreadPool());
break;
@@ -146,10 +143,10 @@ std::unique_ptr<Server> ServerBuilder::BuildAndStart() {
if ((*cq)->IsFrequentlyPolled()) {
grpc_server_register_completion_queue(server->server_, (*cq)->cq(),
nullptr);
- num_frequently_polled_cqs++;
} else {
grpc_server_register_non_listening_completion_queue(server->server_,
(*cq)->cq(), nullptr);
+ num_non_listening_cqs++;
}
}