ruby/ruby — pull request #607 by ksperling (2014-05-06 04:02:24+00:00)
Title: Avoid hang during shutdown due to active keep-alive connections

The current code doesn't correctly stop handling requests on keep-alive connections if the client keeps sending requests quickly. This is because the existing check for ```@status != :Running``` only kicks in if the initial ```IO.select()``` returns with a timeout.

Also handle ```Errno::ENOTSOCK```, which is what ```IO.select()``` raises on Windows due to ```@listeners``` becoming empty during shutdown.