We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 513b8a7 commit 022bc04Copy full SHA for 022bc04
src/mongoc/mongoc-client.c
@@ -669,6 +669,7 @@ mongoc_client_new (const char *uri_string)
669
{
670
const mongoc_write_concern_t *write_concern;
671
mongoc_client_t *client;
672
+ const bson_t *read_prefs_tags;
673
mongoc_uri_t *uri;
674
const bson_t *options;
675
bson_iter_t iter;
@@ -712,6 +713,11 @@ mongoc_client_new (const char *uri_string)
712
713
client->read_prefs = mongoc_read_prefs_new (MONGOC_READ_PRIMARY);
714
}
715
716
+ read_prefs_tags = mongoc_uri_get_read_prefs (client->uri);
717
+ if (!bson_empty (read_prefs_tags)) {
718
+ mongoc_read_prefs_set_tags (client->read_prefs, read_prefs_tags);
719
+ }
720
+
721
_mongoc_cluster_init (&client->cluster, client->uri, client);
722
723
#ifdef MONGOC_ENABLE_SSL
0 commit comments