File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ synchronized void update(Set<Node> seenNodes){
134
134
_isSecondary = res .getBoolean ( "secondary" , false );
135
135
_lastPrimarySignal = res .getString ( "primary" );
136
136
137
- if ( res .containsKey ( "hosts" ) ){
137
+ if ( res .containsField ( "hosts" ) ){
138
138
for ( Object x : (List )res .get ("hosts" ) ){
139
139
String host = x .toString ();
140
140
Node node = _addIfNotHere (host );
@@ -143,6 +143,14 @@ synchronized void update(Set<Node> seenNodes){
143
143
}
144
144
}
145
145
146
+ if ( res .containsField ( "passives" ) ){
147
+ for ( Object x : (List )res .get ("passives" ) ){
148
+ String host = x .toString ();
149
+ Node node = _addIfNotHere (host );
150
+ if (node != null && seenNodes != null )
151
+ seenNodes .add (node );
152
+ }
153
+ }
146
154
}
147
155
catch ( MongoException e ){
148
156
Throwable root = e ;
You can’t perform that action at this time.
0 commit comments