epoll: ensure closing of pipelined clients if required
commit49f70632e2f4a9b84fd4fced7439d0844fed1bbd
authorEric Wong <normalperson@yhbt.net>
Thu, 24 Jan 2013 19:47:41 +0000 (24 19:47 +0000)
committerEric Wong <normalperson@yhbt.net>
Thu, 24 Jan 2013 19:54:41 +0000 (24 19:54 +0000)
tree9a037666f98b597b5cecddbe3c266221c1eaae37
parentad5ab9fe21d57b78b7c6681bbc0907c934e898b0
epoll: ensure closing of pipelined clients if required

on_read normally relies on the close checking in on_readable,
but on_deferred_write_complete may be called from on_writable
instead (bypassing the close check of on_readable).

This affects both Epoll and XEpoll users, but only if they
were sending responses via body#to_path and triggering
on_deferred_write_complete.

While we're at it, favor non-recursive want_more instead of
calling on_readable recursively in ev_write_responses to
prevent stack growth.
lib/rainbows/epoll/client.rb