Instead of increasing the retry frequency for an unreachable server, always use the same frequency, and force an attempt to connect only when there is a failure to find a server that matches the server selector.
Remove DBPort.finalize() method, as there is already code in place to ensure that it is closed.
Avoid turning the active query into a string unless it's needed.
Avoid possible NPEs in JMXConnectionPoolListener.
Delay creation of DBDecoder in DBPort until after the socket is successfully opened
Remove all use of setVersion for determining whether to trust the server description of a replica set member.