File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -389,7 +389,7 @@ uint32_t
389
389
_mongoc_client_sendv (mongoc_client_t * client ,
390
390
mongoc_rpc_t * rpcs ,
391
391
size_t rpcs_len ,
392
- uint32_t hint ,
392
+ uint32_t hint ,
393
393
const mongoc_write_concern_t * write_concern ,
394
394
const mongoc_read_prefs_t * read_prefs ,
395
395
bson_error_t * error )
@@ -648,6 +648,7 @@ _mongoc_client_recv_gle (mongoc_client_t *client,
648
648
mongoc_client_t *
649
649
mongoc_client_new (const char * uri_string )
650
650
{
651
+ const mongoc_write_concern_t * write_concern ;
651
652
mongoc_client_t * client ;
652
653
mongoc_uri_t * uri ;
653
654
const bson_t * options ;
@@ -683,16 +684,19 @@ mongoc_client_new (const char *uri_string)
683
684
client -> initiator = mongoc_client_default_stream_initiator ;
684
685
client -> initiator_data = client ;
685
686
686
- _mongoc_cluster_init (& client -> cluster , client -> uri , client );
687
+ write_concern = mongoc_uri_get_write_concern (uri );
688
+ client -> write_concern = mongoc_write_concern_copy (write_concern );
687
689
688
- mongoc_counter_clients_active_inc ( );
690
+ _mongoc_cluster_init ( & client -> cluster , client -> uri , client );
689
691
690
692
#ifdef MONGOC_ENABLE_SSL
691
693
if (has_ssl ) {
692
694
mongoc_client_set_ssl_opts (client , mongoc_ssl_opt_get_default ());
693
695
}
694
696
#endif
695
697
698
+ mongoc_counter_clients_active_inc ();
699
+
696
700
return client ;
697
701
}
698
702
You can’t perform that action at this time.
0 commit comments