RUBY-444
During a refresh Thread.current[:managers] has the potential to be nil. This fix checks to make sure Thread.current[:managers] exists before trying to access the managers hash.
This commit is contained in:
parent
f55fc95bf4
commit
291a9334b6
@ -402,7 +402,7 @@ module Mongo
|
||||
end
|
||||
|
||||
def get_socket_from_pool(pool_type)
|
||||
if Thread.current[:managers][self] != @manager
|
||||
if Thread.current[:managers] && Thread.current[:managers][self] != @manager
|
||||
Thread.current[:managers][self] = @manager
|
||||
end
|
||||
|
||||
@ -426,7 +426,7 @@ module Mongo
|
||||
end
|
||||
|
||||
def local_manager
|
||||
Thread.current[:managers][self]
|
||||
Thread.current[:managers][self] if Thread.current[:managers]
|
||||
end
|
||||
|
||||
def arbiters
|
||||
|
Loading…
Reference in New Issue
Block a user