The state management has evolved slightly over time,
so update the comments to reflect that.
---
 lib/yahns/stream_file.rb | 4 +++-
 lib/yahns/wbuf_common.rb | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/yahns/stream_file.rb b/lib/yahns/stream_file.rb
index 793f0de..fabbb9d 100644
--- a/lib/yahns/stream_file.rb
+++ b/lib/yahns/stream_file.rb
@@ -36,7 +36,9 @@ def initialize(body, persist, offset, count)
     @body = body
   end
 
-  # called by last wbuf_flush
+  # called by last wbuf_flush,
+  # returns true / false for persistent/non-persistent connections,
+  # :ignore for hijacked connections
   def wbuf_close(client)
     @tmpio.close if NeedClose === @tmpio
     wbuf_close_common(client)
diff --git a/lib/yahns/wbuf_common.rb b/lib/yahns/wbuf_common.rb
index 0ce4526..9e2d855 100644
--- a/lib/yahns/wbuf_common.rb
+++ b/lib/yahns/wbuf_common.rb
@@ -9,7 +9,9 @@
 end
 
 module Yahns::WbufCommon # :nodoc:
-  # returns nil on success, :wait_*able when blocked
+  # returns true / false for persistent/non-persistent connections
+  # returns :wait_*able when blocked
+  # returns :ignore if hijacked
   # currently, we rely on each thread having exclusive access to the
   # client socket, so this is never called concurrently with wbuf_write
   def wbuf_flush(client)
-- 
EW


Reply via email to