From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-2.9 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=unavailable version=3.3.2 X-Original-To: yahns-public@yhbt.net Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 918F81F69C for ; Sat, 24 Jan 2015 00:25:28 +0000 (UTC) From: Eric Wong To: yahns-public@yhbt.net Subject: [PATCH] update comments about wbuf_close return values Date: Sat, 24 Jan 2015 00:25:27 +0000 Message-Id: <1422059128-3998-1-git-send-email-e@80x24.org> X-Mailer: git-send-email 2.2.1.203.g624e5c2 List-Id: 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