poco changes are now used in MongoDBDictionarySource

This commit is contained in:
artem-yadr 2023-02-17 14:56:21 +03:00
parent 83dbde476b
commit 08734d4dc0

View File

@ -114,7 +114,11 @@ MongoDBDictionarySource::MongoDBDictionarySource(
{
if (!uri.empty())
{
Poco::URI poco_uri(uri);
// Connect with URI.
Poco::MongoDB::Connection::SocketFactory socket_factory;
connection->connect(uri, socket_factory);
Poco::URI poco_uri(connection.uri());
// Parse database from URI. This is required for correctness -- the
// cursor is created using database name and collection name, so we have
@ -134,10 +138,6 @@ MongoDBDictionarySource::MongoDBDictionarySource(
{
user.resize(separator);
}
// Connect with URI.
Poco::MongoDB::Connection::SocketFactory socket_factory;
connection->connect(uri, socket_factory);
}
else
{