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 (
302
302
bool is_secondary = false;
303
303
bool is_arbiter = false;
304
304
bool is_replicaset = false;
305
+ bool is_hidden = false;
305
306
const uint8_t * bytes ;
306
307
uint32_t len ;
307
308
int num_keys = 0 ;
@@ -377,13 +378,17 @@ mongoc_server_description_handle_ismaster (
377
378
if (! BSON_ITER_HOLDS_DOCUMENT (& iter )) goto failure ;
378
379
bson_iter_document (& iter , & len , & bytes );
379
380
bson_init_static (& sd -> tags , bytes , len );
381
+ } else if (strcmp ("hidden" , bson_iter_key (& iter )) == 0 ) {
382
+ is_hidden = bson_iter_bool (& iter );
380
383
}
381
384
}
382
385
383
386
if (is_shard ) {
384
387
sd -> type = MONGOC_SERVER_MONGOS ;
385
388
} 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 ) {
387
392
sd -> type = MONGOC_SERVER_RS_PRIMARY ;
388
393
} else if (is_secondary ) {
389
394
sd -> type = MONGOC_SERVER_RS_SECONDARY ;
You can’t perform that action at this time.
0 commit comments