* [PATCH] update comments about wbuf_close return values
@ 2015-01-24 0:25 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2015-01-24 0:25 UTC (permalink / raw)
To: yahns-public
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-24 0:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-24 0:25 [PATCH] update comments about wbuf_close return values Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/yahns.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).