aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/webrick_server.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/webrick_server.rb')
-rw-r--r--railties/lib/webrick_server.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/webrick_server.rb b/railties/lib/webrick_server.rb
index 137c2570ca..71df5432e1 100644
--- a/railties/lib/webrick_server.rb
+++ b/railties/lib/webrick_server.rb
@@ -65,13 +65,13 @@ class DispatchServlet < WEBrick::HTTPServlet::AbstractServlet
def service(req, res)
begin
unless handle_file(req, res)
- REQUEST_MUTEX.lock unless RAILS_ENV == 'production'
+ REQUEST_MUTEX.lock unless ActionController::Base.allow_concurrency
unless handle_dispatch(req, res)
raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found."
end
end
ensure
- unless RAILS_ENV == 'production'
+ unless ActionController::Base.allow_concurrency
REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked?
end
end