Method: Mongo::Server::Connection#socket_timeout

Defined in:
lib/mongo/server/connection.rb

#socket_timeoutFloat Also known as: timeout

Get the timeout to execute an operation on a socket.

Examples:

Get the timeout to execute an operation on a socket.

connection.timeout

Returns:

  • (Float)

    The operation timeout in seconds.

Since:

  • 2.0.0



263
264
265
# File 'lib/mongo/server/connection.rb', line 263

def socket_timeout
  @timeout ||= options[:socket_timeout]
end