Resolve conservation

This commit is contained in:
MikhailBurdukov 2023-04-28 12:40:47 +00:00
parent 40ad8499a0
commit 5c9959af49

View File

@ -144,8 +144,8 @@ MongoDBDictionarySource::MongoDBDictionarySource(
}
else
{
// Connect with host/port/user/etc through constructing
std::string uri_constructed("mongodb://" + host + ":" + std::to_string(port) + "/" + db + "?" + options);
// Connect with host/port/user/etc through constructing the uri
std::string uri_constructed("mongodb://" + host + ":" + std::to_string(port) + "/" + db + (options.empty() ? "" : "?" + options));
connection->connect(uri_constructed, socket_factory);
if (!user.empty())