Skip to content

Commit d58d7a8

Browse files
committed
CDRIVER-2153 mongoc_client_pool_t cannot connect to MongoDB Atlas
1 parent 9af18bb commit d58d7a8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/mongoc/mongoc-client-pool.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,12 @@ mongoc_client_pool_new (const mongoc_uri_t *uri)
132132
BSON_ASSERT (mongoc_client_pool_set_appname (pool, appname));
133133
}
134134

135+
#ifdef MONGOC_ENABLE_SSL
136+
if (mongoc_uri_get_ssl (pool->uri)) {
137+
/* sets use_ssl = true */
138+
mongoc_client_pool_set_ssl_opts (pool, mongoc_ssl_opt_get_default ());
139+
}
140+
#endif
135141
mongoc_counter_client_pools_active_inc ();
136142

137143
RETURN (pool);

0 commit comments

Comments
 (0)