event_machine: protect IO#close from EBADF
[rainbows.git] / t / heartbeat-timeout.ru
blobd9904e8e22cf7d4f38b89e6824b90f69f72f3b8d
1 use Rack::ContentLength
2 headers = { 'Content-Type' => 'text/plain' }
3 run lambda { |env|
4   case env['PATH_INFO']
5   when "/block-forever"
6     Process.kill(:STOP, $$)
7     sleep # in case STOP signal is not received in time
8     [ 500, headers, [ "Should never get here\n" ] ]
9   else
10     [ 200, headers, [ "#$$\n" ] ]
11   end