Skip to content
Snippets Groups Projects
Commit eac07c3c authored by Vijay Pai's avatar Vijay Pai
Browse files

WIP

parent b645a2d3
No related branches found
No related tags found
No related merge requests found
......@@ -54,10 +54,15 @@ ServerBuilder::ServerBuilder()
: max_message_size_(-1), generic_service_(nullptr) {
grpc_compression_options_init(&compression_options_);
gpr_once_init(&once_init_plugin_list, do_plugin_list_init);
for (auto it = g_plugin_factory_list->begin(); it != g_plugin_factory_list->end(); it++) {
for (auto it = g_plugin_factory_list->begin();
it != g_plugin_factory_list->end(); it++) {
auto& factory = *it;
std::unique_ptr<ServerBuilderPlugin> plugin = factory();
plugins_[plugin->name()] = std::move(plugin);
auto name = plugin->name();
ServerBuilderPlugin* plugin_ptr = plugin.release();
plugins_[name] = nullptr;
auto pl = plugins_.find(name);
pl->second.reset(plugin_ptr);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment