minor: small fix in replset initialization code
This commit is contained in:
parent
bcb32e5935
commit
fec284ee99
|
@ -440,19 +440,18 @@ module Mongo
|
||||||
|
|
||||||
# Generic initialization code.
|
# Generic initialization code.
|
||||||
def setup(opts)
|
def setup(opts)
|
||||||
super opts
|
|
||||||
|
|
||||||
@safe_mutex_lock = Mutex.new
|
@safe_mutex_lock = Mutex.new
|
||||||
@safe_mutexes = Hash.new {|hash, key| hash[key] = Mutex.new}
|
@safe_mutexes = Hash.new {|hash, key| hash[key] = Mutex.new}
|
||||||
|
|
||||||
# Timeout on socket connect.
|
|
||||||
@connect_timeout = opts[:connect_timeout] || 30
|
|
||||||
|
|
||||||
# Clean up connections to dead threads.
|
# Clean up connections to dead threads.
|
||||||
@last_cleanup = Time.now
|
@last_cleanup = Time.now
|
||||||
@cleanup_lock = Mutex.new
|
@cleanup_lock = Mutex.new
|
||||||
|
|
||||||
@last_refresh = Time.now
|
@last_refresh = Time.now
|
||||||
|
|
||||||
|
opts[:connect_timeout] = opts[:connect_timeout] || 30
|
||||||
|
|
||||||
|
super opts
|
||||||
end
|
end
|
||||||
|
|
||||||
# Checkout a socket connected to a node with one of
|
# Checkout a socket connected to a node with one of
|
||||||
|
|
Loading…
Reference in New Issue