Skip to content

Commit 372211e

Browse files
committed
JAVA-409: when creating Mongo to single server, its address appears twice (ipv4/ipv6) and it gets exploded into a replica set
1 parent a7f4454 commit 372211e

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/main/com/mongodb/DBTCPConnector.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,9 @@ public DBTCPConnector( Mongo m , ServerAddress addr )
3737

3838
_createLogger.info( addr.toString() );
3939

40-
if ( addr.isPaired() ){
41-
_allHosts = new ArrayList<ServerAddress>( addr.explode() );
42-
_rsStatus = new ReplicaSetStatus( m, _allHosts );
43-
_createLogger.info( "switching to replica set mode : " + _allHosts + " -> " + getAddress() );
44-
}
45-
else {
46-
_set( addr );
47-
_allHosts = null;
48-
_rsStatus = null;
49-
}
40+
_set( addr );
41+
_allHosts = null;
42+
_rsStatus = null;
5043

5144
}
5245

0 commit comments

Comments
 (0)