RUBY-377 ensure that @manager is never nil
This commit is contained in:
parent
74e6a60c25
commit
d3c9637268
@ -153,6 +153,7 @@ module Mongo
|
|||||||
log(:info, "Connecting...")
|
log(:info, "Connecting...")
|
||||||
return if @connected
|
return if @connected
|
||||||
manager = PoolManager.new(self, @seeds)
|
manager = PoolManager.new(self, @seeds)
|
||||||
|
@manager = manager
|
||||||
manager.connect
|
manager.connect
|
||||||
|
|
||||||
update_config(manager)
|
update_config(manager)
|
||||||
@ -341,7 +342,7 @@ module Mongo
|
|||||||
|
|
||||||
# Checkin a socket used for writing.
|
# Checkin a socket used for writing.
|
||||||
def checkin_writer(socket)
|
def checkin_writer(socket)
|
||||||
if !self.primary_pool.checkin(socket)
|
if !self.primary_pool || !self.primary_pool.checkin(socket)
|
||||||
close_socket(socket)
|
close_socket(socket)
|
||||||
end
|
end
|
||||||
sync_refresh
|
sync_refresh
|
||||||
|
Loading…
Reference in New Issue
Block a user