ThingFish/DeveloperNotes: mongrel_handlers_process.patch
| File mongrel_handlers_process.patch, 1.4 kB (added by mgranger, 1 year ago) |
|---|
-
lib/mongrel.rb
old new 613 613 # request is good so far, continue processing the response 614 614 response = HttpResponse.new(client) 615 615 616 # Process each handler in registered order until we run out or one finalizes the response. 617 handlers.each do |handler| 618 handler.process(request, response) 619 break if response.done or client.closed? 620 end 616 process_handlers(client, handlers, request, response) 621 617 622 618 # And finally, if nobody closed the response off, we finalize it. 623 619 unless response.done or client.closed? … … 658 654 end 659 655 end 660 656 657 # Process each handler in registered order until we run out or one finalizes the 658 # response. 659 def process_handlers(client, handlers, request, response) 660 handlers.each do |handler| 661 handler.process(request, response) 662 return if response.done or client.closed? 663 end 664 end 665 666 661 667 # Used internally to kill off any worker threads that have taken too long 662 668 # to complete processing. Only called if there are too many processors 663 669 # currently servicing. It returns the count of workers still active
