Browse files

Merge branch 'master' into edge

  • Loading branch information...
2 parents a5657f0 + 2295e93 commit 07735a02a25c24fb64f04331a1bd274ced54c5f8 @tra tra committed Nov 23, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/patches.rb
View
2 lib/patches.rb
@@ -3,6 +3,8 @@ class ActiveRecord::Base
# reconnect without disconnecting
if Spawn::RAILS_2_2
def self.spawn_reconnect(klass=self)
+ # keep ancestors' connection_handlers around to avoid them being garbage collected
+ (@@ancestor_connection_handlers ||= []) << @@connection_handler
@@connection_handler = ActiveRecord::ConnectionAdapters::ConnectionHandler.new
establish_connection
end

0 comments on commit 07735a0

Please sign in to comment.