summaryrefslogtreecommitdiff
path: root/src/mongo/transport
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/transport')
-rw-r--r--src/mongo/transport/message_compressor_registry.cpp9
-rw-r--r--src/mongo/transport/message_compressor_registry.h2
2 files changed, 4 insertions, 7 deletions
diff --git a/src/mongo/transport/message_compressor_registry.cpp b/src/mongo/transport/message_compressor_registry.cpp
index 9bdb640e5a9..2a38b4a3f6f 100644
--- a/src/mongo/transport/message_compressor_registry.cpp
+++ b/src/mongo/transport/message_compressor_registry.cpp
@@ -129,13 +129,10 @@ Status addMessageCompressionOptions(moe::OptionSection* options, bool forShell)
return Status::OK();
}
-Status storeMessageCompressionOptions(const moe::Environment& params) {
+Status storeMessageCompressionOptions(const std::string& compressors) {
std::vector<std::string> restrict;
- if (params.count("net.compression.compressors")) {
- auto compressorListStr = params["net.compression.compressors"].as<std::string>();
- if (compressorListStr != kDisabledConfigValue) {
- boost::algorithm::split(restrict, compressorListStr, boost::is_any_of(", "));
- }
+ if (compressors != kDisabledConfigValue) {
+ boost::algorithm::split(restrict, compressors, boost::is_any_of(", "));
}
auto& compressorFactory = MessageCompressorRegistry::get();
diff --git a/src/mongo/transport/message_compressor_registry.h b/src/mongo/transport/message_compressor_registry.h
index 933c247e928..fb980bbab0a 100644
--- a/src/mongo/transport/message_compressor_registry.h
+++ b/src/mongo/transport/message_compressor_registry.h
@@ -120,6 +120,6 @@ private:
};
Status addMessageCompressionOptions(moe::OptionSection* options, bool forShell);
-Status storeMessageCompressionOptions(const moe::Environment& params);
+Status storeMessageCompressionOptions(const std::string& compressors);
void appendMessageCompressionStats(BSONObjBuilder* b);
} // namespace mongo