From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS33070 50.56.128.0/17 X-Spam-Status: No, score=0.0 required=3.0 tests=MSGID_FROM_MTA_HEADER, TVD_RCVD_IP shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: "W. Andrew Loe III" Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: Sinatra stream(:keep_open) not holding connections open Date: Fri, 18 Jan 2013 16:21:14 -0800 Message-ID: References: <20121205014454.GA24401@dcvr.yhbt.net> <20121205031848.GA32757@dcvr.yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1358554886 7192 80.91.229.3 (19 Jan 2013 00:21:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2013 00:21:26 +0000 (UTC) To: "Rainbows! list" Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Sat Jan 19 01:21:41 2013 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrewloe.com; s=google; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=kZjahuItBfumBKfc9luVPXnVb1z+oFAhJrPhIwFjBGg=; b=b3HlFQG7q3C905lZhkZzGMMd40KsUACPe374xjadVKHucUgh564D1NF1FD7Hq75TOJ A9Lg2tBCjWl97Vo8dqaxByi/zwT+tGaRlc0ScEuOO5Duid8ZMm6nZ4BV3/fF9UtBBuPQ t6XEDD1szzNGeFlDlz9/jlKjgxiSt5ixSgKEM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:x-originating-ip:in-reply-to:references :date:message-id:subject:from:to:content-type:x-gm-message-state; bh=kZjahuItBfumBKfc9luVPXnVb1z+oFAhJrPhIwFjBGg=; b=U4pjIeejlGNwMsYX+XqbvLjduhXLHn9yPD7YqpddnPly75b+0iOqOD9k9TJCh3+Iwg TGdHMeMXAGDvNWQ/BbSXa10nRxmQOaAW3IM/hFNhorX5kcVeqG6n7TAeipJYFJo2lznJ XjfX8bJ4KcPHqGZE2hS8QlofKZuGU2Z0UbF2bEzyqACLGHqSqSvjpzFArv+WfltMgLDP /mTiZWuQp74tckcLlhIhDZtMjxplaU1ad8KfxG65NoaDXMXO+M2d7fv3KM+l+cxeih6r JBHg9yk/ynVtQ4z1qwSG2YsNZ4MBaye0kYw7s2RSaBLLKJvgKd0nofw18EFYCeHjFuRJ PT/Q== X-Received: by 10.52.36.206 with SMTP id s14mr10310543vdj.93.1358554874908; Fri, 18 Jan 2013 16:21:14 -0800 (PST) X-Originating-IP: [66.171.181.62] In-Reply-To: X-Gm-Message-State: ALoCoQkUC6KBbFO2k/V1OdMwaqYmqon9RLcywg0l1kS55O3/BZ9TNnXQMfoLTtT9q58DNJ8xKLks X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:436 Archived-At: Received: from 50-56-192-79.static.cloud-ips.com ([50.56.192.79] helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TwMBo-0008Na-2d for gclrrg-rainbows-talk@m.gmane.org; Sat, 19 Jan 2013 01:21:40 +0100 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 0D6252E083; Sat, 19 Jan 2013 00:21:23 +0000 (UTC) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by rubyforge.org (Postfix) with ESMTP id D11362E083 for ; Sat, 19 Jan 2013 00:21:16 +0000 (UTC) Received: by mail-vc0-f173.google.com with SMTP id fy7so1041662vcb.18 for ; Fri, 18 Jan 2013 16:21:15 -0800 (PST) Received: by 10.58.96.18 with HTTP; Fri, 18 Jan 2013 16:21:14 -0800 (PST) This appears to have been broken in my application in Rainbows 4.4.3. On Tue, Dec 4, 2012 at 10:09 PM, W. Andrew Loe III wrote: > Works great! Thank you very much for the quick response and patch! > > Feature Request: https://github.com/celluloid/celluloid-io > Celluloid::IO backend, the spiritual successor to cool.io. I'm going > to take a stab at this soon, but wanted to get something out. > > On Tue, Dec 4, 2012 at 7:18 PM, Eric Wong wrote: >> "W. Andrew Loe III" wrote: >>> I've pushed a very very stripped down example that just echos the time. >>> https://github.com/loe/sinatra-sse >> >> Thanks for the test case, I've just pushed out the following fix >> to "master" of git://bogomips.org/rainbows.git >> >> I've pushed a rainbows 4.4.1.1.gd5c8c prerelease to RubyGems.org >> It should be installable with: gem install --pre rainbows >> >> I expect this to work for you, but be sure to let me know if it doesn't :x >> >> Since this is a pretty small fix, I think I'll push 4.4.2 final >> very soon. >> >> >From d5c8cc8b51619f0d33f75036c53e3936ad2749b2 Mon Sep 17 00:00:00 2001 >> From: Eric Wong >> Date: Wed, 5 Dec 2012 03:08:19 +0000 >> Subject: [PATCH] event_machine: properly defer body.close for async >> >> Calling body.close in the normal write_response() code path >> is incorrect, and only worked out of sheer luck with >> Cramp and async_sinata. >> >> This change allows stream(:keep_open) in Sinatra to work >> properly. >> >> Thanks to W. Andrew Loe III for the informative bug report >> and reproducible test case. >> >> ref: http://mid.gmane.org/CA+-9oNd1EFqsniPkkPTwu5opTCinbM7-2KHoXov7+y3LE4s4Tg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org >> --- >> lib/rainbows/event_machine/client.rb | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/lib/rainbows/event_machine/client.rb b/lib/rainbows/event_machine/client.rb >> index e56931f..fc0dfe3 100644 >> --- a/lib/rainbows/event_machine/client.rb >> +++ b/lib/rainbows/event_machine/client.rb >> @@ -64,8 +64,11 @@ class Rainbows::EventMachine::Client < EM::Connection >> @state = :headers if alive >> if body.respond_to?(:errback) && body.respond_to?(:callback) >> @deferred = body >> + write_headers(status, headers, alive) >> + write_body_each(body) >> deferred_errback(body) >> deferred_callback(body, alive) >> + return >> elsif body.respond_to?(:to_path) >> st = File.stat(path = body.to_path) >> >> -- >> Eric Wong >> _______________________________________________ >> Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org >> http://rubyforge.org/mailman/listinfo/rainbows-talk >> Do not quote signatures (like this one) or top post when replying _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying