aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/cpp/server/server_builder.cc
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-09-01 14:22:55 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-09-01 14:22:55 -0700
commitfb475c93c4ee71998f63cefdb1846e3e6aa8f3a2 (patch)
tree15a90a89d829a7be7964dcd599316a2bd8ae05fa /src/cpp/server/server_builder.cc
parent555cf763a3f939639e03ef9e1f2a67bc5dfe2a19 (diff)
parent79620aaa1052fd02539a36caa63cbe24a2087b0f (diff)
Merge remote-tracking branch 'upstream/master' into deadline_filter
Diffstat (limited to 'src/cpp/server/server_builder.cc')
-rw-r--r--src/cpp/server/server_builder.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc
index 45bb858e2e..1a014da3b8 100644
--- a/src/cpp/server/server_builder.cc
+++ b/src/cpp/server/server_builder.cc
@@ -35,10 +35,9 @@
#include <grpc++/impl/service_type.h>
#include <grpc++/server.h>
-#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
+#include <grpc/support/useful.h>
-#include "include/grpc/support/useful.h"
#include "src/cpp/server/thread_pool_interface.h"
namespace grpc {
@@ -154,14 +153,12 @@ std::unique_ptr<Server> ServerBuilder::BuildAndStart() {
(*option)->UpdateArguments(&args);
(*option)->UpdatePlugins(&plugins_);
}
- if (!thread_pool) {
- for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) {
- if ((*plugin)->has_sync_methods()) {
- thread_pool.reset(CreateDefaultThreadPool());
- has_sync_methods = true;
- break;
- }
+ for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) {
+ if (!thread_pool && (*plugin)->has_sync_methods()) {
+ thread_pool.reset(CreateDefaultThreadPool());
+ has_sync_methods = true;
}
+ (*plugin)->UpdateChannelArguments(&args);
}
if (max_message_size_ > 0) {
args.SetInt(GRPC_ARG_MAX_MESSAGE_LENGTH, max_message_size_);