File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,7 @@ mongoc_server_description_handle_ismaster (
302302 bool is_secondary = false;
303303 bool is_arbiter = false;
304304 bool is_replicaset = false;
305+ bool is_hidden = false;
305306 const uint8_t * bytes ;
306307 uint32_t len ;
307308 int num_keys = 0 ;
@@ -377,13 +378,17 @@ mongoc_server_description_handle_ismaster (
377378 if (! BSON_ITER_HOLDS_DOCUMENT (& iter )) goto failure ;
378379 bson_iter_document (& iter , & len , & bytes );
379380 bson_init_static (& sd -> tags , bytes , len );
381+ } else if (strcmp ("hidden" , bson_iter_key (& iter )) == 0 ) {
382+ is_hidden = bson_iter_bool (& iter );
380383 }
381384 }
382385
383386 if (is_shard ) {
384387 sd -> type = MONGOC_SERVER_MONGOS ;
385388 } else if (sd -> set_name ) {
386- if (is_master ) {
389+ if (is_hidden ) {
390+ sd -> type = MONGOC_SERVER_RS_OTHER ;
391+ } else if (is_master ) {
387392 sd -> type = MONGOC_SERVER_RS_PRIMARY ;
388393 } else if (is_secondary ) {
389394 sd -> type = MONGOC_SERVER_RS_SECONDARY ;
You can’t perform that action at this time.
0 commit comments