Ticket #3433: webrick-mutex.diff
| File webrick-mutex.diff, 0.9 kB (added by tom@craz8.com, 4 years ago) |
|---|
-
railties/lib/webrick_server.rb
old new 77 77 end 78 78 79 79 def service(req, res) #:nodoc: 80 begin81 unless handle_file(req, res)80 unless handle_file(req, res) 81 begin 82 82 REQUEST_MUTEX.lock unless ActionController::Base.allow_concurrency 83 83 unless handle_dispatch(req, res) 84 84 raise WEBrick::HTTPStatus::NotFound, "`#{req.path}' not found." 85 85 end 86 ensure 87 unless ActionController::Base.allow_concurrency 88 REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked? 89 end 86 90 end 87 ensure88 unless ActionController::Base.allow_concurrency89 REQUEST_MUTEX.unlock if REQUEST_MUTEX.locked?90 end91 91 end 92 92 end 93 93