diff options
author | Eric Wong <e@80x24.org> | 2013-11-07 18:15:26 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2013-11-07 18:15:26 +0000 |
commit | 0258cd5dd91241931cca08048ab0a2067e323ee6 (patch) | |
tree | b1ec07e13b4d038a0084890a57815b6c97742c5b /lib/yahns/http_response.rb | |
parent | d9b7a620f43fe815c5ddbf341a73b51bd0e7da8a (diff) | |
download | yahns-0258cd5dd91241931cca08048ab0a2067e323ee6.tar.gz |
Simultaneously waiting for both readability and writability is likely unnecessary. Sockets become writable much more commonly, and if we need to read, we'll issue a read the next time it enters yahns_step (after it becomes writable). Also, this makes kqueue easier-to-implement as I don't believe it implements a way to combine EVFILT_READ with EVFILT_WRITE (especially not safely while relying on EV_ONESHOT behavior).
Diffstat (limited to 'lib/yahns/http_response.rb')
-rw-r--r-- | lib/yahns/http_response.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/yahns/http_response.rb b/lib/yahns/http_response.rb index 8a2426b..7207bd1 100644 --- a/lib/yahns/http_response.rb +++ b/lib/yahns/http_response.rb @@ -81,9 +81,9 @@ module Yahns::HttpResponse # :nodoc: :wait_readable else @state = :pipelined - # may need to wait for readability if SSL, - # only need writability if plain TCP - :wait_readwrite + # we shouldn't start processing the application again until we know + # the socket is writable for the response + :wait_writable end else # shutdown is needed in case the app forked, we rescue here since |