mongodb/mongo-ruby-driver — pull request #514 by estolfo (2014-10-14 14:51:03+00:00)
Title: RUBY-831 Add an accessible? method to determine if a db is reachable

The user who opened ticket RUBY-831 wanted a way to determine if a server was reachable through the #active? method on a client. I decided that I didn't want to mix the semantics of #active? and the concept of a server being reachable within the op_timeout number of seconds. I therefore added a method #accessible? on a client that would rescue a OperationTimeout and return false. This allows someone to separately determine if a connection can be made to a server and if an operation can be done in < op_timeout number of seconds.