Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions lib/drb/drb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,14 @@ def self.make_pool
new_pool = []
pool.each do |c|
if conn.nil? and c.uri == remote_uri
conn = c if c.alive?
begin
conn = c if c.alive?
rescue StandardError
begin
c.close
rescue StandardError
end
end
else
new_pool.push c
end
Expand All @@ -1306,7 +1313,12 @@ def self.make_pool
when :store then
conn = message[1]
pool.unshift(conn)
pool.pop.close while pool.size > POOL_SIZE
while pool.size > POOL_SIZE
begin
pool.pop.close
rescue StandardError
end
end
conn
else
nil
Expand Down