rails/rails — pull request #9604 by sgrif (2013-03-07 22:11:35+00:00)
Title: Exceptions thrown in view when using ActionController::Live cause server crash

Any exceptions that occured in a view for a controller using ActionController::Live would cause the server to either hang with an open socket indefinitely, or immediately crash (depending on whether the server was launched with rails s or directly).

Easiest way to duplicate the issue is to include ActionController::Live, and visit a route that has no associated view. Issue was reproduced with Ruby 1.9.3 as well as 2.0.

Added a catch block in Live to make exception handling work similarly to streaming templates. A redirect to 500.html is issued using a script tag, the stream is closed, and the exception is logged to the terminal.