lib/mongo/server/connection_pool.rb
# Creates and adds a connection to the pool, if the pool's size is below
# min_size. Retries once if a socket-related error is encountered during
# this process and raises if a second error or a non socket-related error occurs.
#
# Used by the pool populator background thread.
#
# @return [ true | false ] Whether this method should be called again
#   to create more connections.
# @raise [ Error::AuthError, Error ] The second socket-related error raised if a retry
# occured, or the non socket-related error
#
# @api private
Creates and adds a connection to the pool, if the pool's size is below
min_size. Retries once if a socket-related error is encountered during
this process and raises if a second error or a non socket-related error occurs.

Used by the pool populator background thread.
Creates and adds a connection to the pool if the pool ' s size is below min_size . Retries once if a socket - related error is encountered during this process and raises if a second error or a non socket - related error occurs . Used by the pool populator background thread .
def populate
        return false if closed?
        begin
          return create_and_add_connection
        rescue Error::SocketError, Error::SocketTimeoutError => e
          log_warn("Populator failed to connect a connection for #{address}: #{e.class}: #{e}. It will retry.")
        end
        return create_and_add_connection
      rescue Error::AuthError, Error
        @available_semaphore.signal
        raise
      end
def populate return false if closed? begin return create_and_add_connection rescue Error :: SocketError , Error :: SocketTimeoutError => e log_warn ( "Populator failed to connect a connection for #{address}: #{e.class}: #{e}. It will retry." ) end return create_and_add_connection rescue Error :: AuthError , Error @available_semaphore . signal raise end
Creates and adds a connection to the pool, if the pool's size is below
min_size.
Creates and adds a connection to the pool if the pool ' s size is below min_size .
# an error was encountered while connecting the connection, # ignore this first error and try again. # wake up one thread waiting for connections, since one could not # be created here, and can instead be created in flow
Whether this method should be called again to create more connections.
Whether this method should be called again to create more connections .
 true | false 
[ Error::AuthError, Error ] The second socket-related error raised if a retry occured, or the non socket-related error
[ Error :: AuthError Error ] The second socket - related error raised if a retry occured or the non socket - related error
api
None