Skip to content

Commit 253a766

Browse files
committed
JAVA-410: if using DBAddress instead of ServerAddress, server matching in replica set doesnt work
1 parent b1bdf58 commit 253a766

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/com/mongodb/DBAddress.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ public boolean equals( Object other ){
144144
a._port == _port &&
145145
a._db.equals( _db ) &&
146146
a._host.equals( _host );
147+
} else if ( other instanceof ServerAddress ){
148+
return other.equals(this);
147149
}
148150
return false;
149151
}

0 commit comments

Comments
 (0)