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...")
|
||||
return if @connected
|
||||
manager = PoolManager.new(self, @seeds)
|
||||
@manager = manager
|
||||
manager.connect
|
||||
|
||||
update_config(manager)
|
||||
|
@ -341,7 +342,7 @@ module Mongo
|
|||
|
||||
# Checkin a socket used for writing.
|
||||
def checkin_writer(socket)
|
||||
if !self.primary_pool.checkin(socket)
|
||||
if !self.primary_pool || !self.primary_pool.checkin(socket)
|
||||
close_socket(socket)
|
||||
end
|
||||
sync_refresh
|
||||
|
|
Loading…
Reference in New Issue