Skip to content

Commit

Permalink
Clear AR connections when daemonizing in case one was used during rai…
Browse files Browse the repository at this point in the history
…ls startup

[git-p4: depot-paths = "//src/ar_mailer/dev/": change = 5641]
  • Loading branch information
drbrain committed Jan 29, 2010
1 parent e6906b9 commit f311c2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
=== 1.5.1

* Clear ActiveRecord connections when daemonizing. Bug by Evan Petrie.

=== 1.5.0

* Added --pid-file option. See --help for details.
Expand Down
1 change: 1 addition & 0 deletions lib/action_mailer/ar_sendmail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ def self.run(args = ARGV)

if options[:Daemon] then
require 'webrick/server'
ActiveRecord::Base.clear_all_connections!
WEBrick::Daemon.start
end

Expand Down

0 comments on commit f311c2c

Please sign in to comment.