diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 3c989c041dd0db0b8fa8ccf83c4a1af5051a21e7..e0aa2a5b94be20ce12c3fb591d86fcb5e2654c86 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -46,6 +46,7 @@ #include <grpc/compression.h> #include <grpc/support/cpu.h> #include <grpc/support/useful.h> +#include <grpc/support/workaround_list.h> struct grpc_resource_quota; @@ -187,7 +188,7 @@ class ServerBuilder { /// Enable a server workaround. Do not use unless you know what the workaround /// does. For explanation and detailed descriptions of workarounds, see /// doc/workarounds.md. - ServerBuilder& EnableWorkaround(uint32_t id); + ServerBuilder& EnableWorkaround(grpc_workaround_list id); private: friend class ::grpc::testing::ServerBuilderPluginTest; diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 797a8eb095c0daf2e7e0496a859dbdf607b7adc4..6dca6a6862cc3b46b1e225f987f0d043d0711b34 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -39,7 +39,6 @@ #include <grpc/support/cpu.h> #include <grpc/support/log.h> #include <grpc/support/useful.h> -#include <grpc/support/workaround_list.h> #include "src/cpp/server/thread_pool_interface.h" @@ -359,7 +358,7 @@ void ServerBuilder::InternalAddPluginFactory( (*g_plugin_factory_list).push_back(CreatePlugin); } -ServerBuilder& ServerBuilder::EnableWorkaround(uint32_t id) { +ServerBuilder& ServerBuilder::EnableWorkaround(grpc_workaround_list id) { switch (id) { case GRPC_WORKAROUND_ID_CRONET_COMPRESSION: return AddChannelArgument(GRPC_ARG_WORKAROUND_CRONET_COMPRESSION, 1);