Method: Mongo::Client#reconnect
- Defined in:
- lib/mongo/client.rb
#reconnect ⇒ true
Reconnect the client.
911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 |
# File 'lib/mongo/client.rb', line 911 def reconnect addresses = cluster.addresses.map(&:to_s) @connect_lock.synchronize do do_close rescue nil @cluster = Cluster.new(addresses, monitoring, ) if @options[:auto_encryption_options] build_encrypter end @closed = false end true end |