about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-01-31 14:21:18 -0800
committerEric Wong <normalperson@yhbt.net>2011-01-31 14:22:54 -0800
commit9bf406655a84090426a62ab60677df529e408f17 (patch)
tree6ae3ea6bb17fa1dc1253f8fcc05290c175f781d0
parent5cbe276ef1e797aef77e7401593f4a7827c37fe3 (diff)
downloadrainbows-9bf406655a84090426a62ab60677df529e408f17.tar.gz
This allows us to more aggressively handle pipelining
as well as trigger future Kgio autopush behavior.
-rw-r--r--lib/rainbows/coolio/client.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rainbows/coolio/client.rb b/lib/rainbows/coolio/client.rb
index f1f16d3..9853321 100644
--- a/lib/rainbows/coolio/client.rb
+++ b/lib/rainbows/coolio/client.rb
@@ -137,6 +137,9 @@ class Rainbows::Coolio::Client < Coolio::IO
       close if @_write_buffer.empty?
     when :headers
       if @buf.empty?
+        buf = @_io.kgio_tryread(16384, RBUF) or return close
+        String === buf and return on_read(buf)
+        # buf == :wait_readable
         unless enabled?
           enable
           KATO[self] = Time.now