about summary refs log tree commit homepage
path: root/lib/unicorn
diff options
context:
space:
mode:
authorYuichi Tateno <hotchpotch@gmail.com>2011-10-03 16:51:19 +0900
committerEric Wong <normalperson@yhbt.net>2011-10-04 15:45:09 -0700
commitc7ba76a21c5d00fb5c173cd6aa847442bbc652cb (patch)
tree84aa704587240293c827edb987c6c2c31bf781af /lib/unicorn
parentac346b5abcfa6253bd792091e5fb011774c40d49 (diff)
downloadunicorn-c7ba76a21c5d00fb5c173cd6aa847442bbc652cb.tar.gz
[ew: we need to explicitly enable GC if it is disabled
 and respect applications that disable GC]

Acked-by: Eric Wong <normalperson@yhbt.net>
Diffstat (limited to 'lib/unicorn')
-rw-r--r--lib/unicorn/oob_gc.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/unicorn/oob_gc.rb b/lib/unicorn/oob_gc.rb
index 312b44c..4e78a70 100644
--- a/lib/unicorn/oob_gc.rb
+++ b/lib/unicorn/oob_gc.rb
@@ -61,7 +61,9 @@ module Unicorn::OobGC
     if OOBGC_PATH =~ OOBGC_ENV[PATH_INFO] && ((@@nr -= 1) <= 0)
       @@nr = OOBGC_INTERVAL
       OOBGC_ENV.clear
+      disabled = GC.enable
       GC.start
+      GC.disable if disabled
     end
   end