diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-05-25 21:00:03 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-05-25 21:00:03 -0700 |
commit | 792064a4aeeab887d7ffcc9dda3fbd8f22488c82 (patch) | |
tree | 12466149e37e793a5bb4304338c0ee531abb271d /lib | |
parent | 8fc898a63e742190903d331958d3b6627f819624 (diff) | |
download | unicorn-792064a4aeeab887d7ffcc9dda3fbd8f22488c82.tar.gz |
No point in refreshing the list of gems unless the app can actually be reloaded.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/unicorn.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/unicorn.rb b/lib/unicorn.rb index 1ca0113..da41399 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -582,11 +582,13 @@ module Unicorn end def build_app! - if defined?(Gem) && Gem.respond_to?(:refresh) - logger.info "Refreshing Gem list" - Gem.refresh + if @app.respond_to?(:arity) && @app.arity == 0 + if defined?(Gem) && Gem.respond_to?(:refresh) + logger.info "Refreshing Gem list" + Gem.refresh + end + @app = @app.call end - @app = @app.call if @app.respond_to?(:arity) && @app.arity == 0 end def proc_name(tag) |