-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.0.2
-
Component/s: Replica Set
-
None
I'm attempting a buildInfo: 1 command on a replica set (I'm specifying two members when connecting) and I get:
NoMethodError: private method `select' called for nil:NilClass from [...]/lib/mongo/server_selector/selectable.rb:138:in `primary' from [...]/lib/mongo/server_selector/primary_preferred.rb:89:in `select' from [...]/lib/mongo/server_selector/selectable.rb:94:in `select_server' from [...]/lib/mongo/database.rb:130:in `command'
I would expect :primary_preferred to use the secondary when the primary fails. This just times out after the specified :socket_timeout.
In any case, it should at least return an error I can handle more gracefully (one that inherits Mongo::Error)