diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index a183e1382dcaa0b825929d584058c5080d622c81..37452e24c59b6d54014c7e6dcb17a05bc1eaaa43 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -297,7 +297,7 @@ each time recvmsg (or equivalent) is called */ If 0 or unset, the balancer calls will have no deadline. */ #define GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS "grpc.grpclb_timeout_ms" /** If non-zero, grpc server's cronet compression workaround will be enabled */ -#define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION "grpc.socket_factory" +#define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION "grpc.workaround.cronet_compression" /** \} */ /** Result of a grpc call. If the caller satisfies the prerequisites of a diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 67a7846da54b87e3df6b34eb51651b58ac98f245..92aa30c240e154a45fc2da65815e1c50e8ab9370 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -363,7 +363,7 @@ void ServerBuilder::InternalAddPluginFactory( (*g_plugin_factory_list).push_back(CreatePlugin); } -void ServerBuilder::EnableWorkaround(uint32_t id) { +ServerBuilder& ServerBuilder::EnableWorkaround(uint32_t id) { switch (id) { case GRPC_WORKAROUND_ID_CRONET_COMPRESSION: enabled_workarounds_.push_back(GRPC_ARG_WORKAROUND_CRONET_COMPRESSION); @@ -371,6 +371,8 @@ void ServerBuilder::EnableWorkaround(uint32_t id) { default: gpr_log(GPR_ERROR, "Workaround %u is not exist or obsolete.", id); } + + return *this; } } // namespace grpc