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 17:01:58 -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 1358557329 25201 80.91.229.3 (19 Jan 2013 01:02:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2013 01:02:09 +0000 (UTC) To: "Rainbows! list" Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Sat Jan 19 02:02:27 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=/rCGrjj7d0+OfjPz7QJYIB34RHis8ZZHFVYLpAm+TwE=; b=bGNHNCKQ4f+3IUsDo31ZpW5O9AyO+mi2MZDjOkRg1SGlVu3xUbIfSapT4qcMgszkLy pCK/Lt15NuvxOEY2M3GcQLmWktx7voHE4daW5rgBe8fOW9PH0/N8kabX7HquGLDBoPD0 sVh8daCFedShjotpcl/+Um2+YmjI21/9VpgSI= 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=/rCGrjj7d0+OfjPz7QJYIB34RHis8ZZHFVYLpAm+TwE=; b=MaeiTifo7v4C16PWJwew9Ea1kXAvGaQkhjyIqR4EHWa7U90fMCAqHVhG/4/YOsO7Oc NnXPwIe/n5wbYhBj/OGriM98EoPLb/GY85WbRDcX3yj70YG4PFNeuRZocn+lIHG3XjeN rRXpCdD/GiHS92EruEPQrr/qQ5MRS55jUsiAz6vt7WZS6gPXpFG32XV7kHuQ1dDdePJw joC1TzgDPsvgSvsqJcrgJrXsXORQaYd3Ri7rnY88dvw/jW6pFPtg4/dpiu3vgY1/8Z9j Q5cNJqyyRcvdaEqUZp/0U03eie1rt7vQeoutL6BSR/B7dum+lTRKfd+L44rwg9JrxHdT licA== X-Received: by 10.220.231.138 with SMTP id jq10mr11809484vcb.29.1358557318909; Fri, 18 Jan 2013 17:01:58 -0800 (PST) X-Originating-IP: [66.171.181.62] In-Reply-To: X-Gm-Message-State: ALoCoQnq01fLuwKrJjNqXZrQARvsH3lDnm91IMVQ47+YA4HipUGNxRw8zYUZpaSGRZq+Zo0dKepP 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:437 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 1TwMpD-0004UL-M3 for gclrrg-rainbows-talk@m.gmane.org; Sat, 19 Jan 2013 02:02:23 +0100 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id D23272E099; Sat, 19 Jan 2013 01:02:05 +0000 (UTC) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by rubyforge.org (Postfix) with ESMTP id 7ED8D2E083 for ; Sat, 19 Jan 2013 01:01:59 +0000 (UTC) Received: by mail-vc0-f175.google.com with SMTP id fw7so1523660vcb.20 for ; Fri, 18 Jan 2013 17:01:59 -0800 (PST) Received: by 10.58.96.18 with HTTP; Fri, 18 Jan 2013 17:01:58 -0800 (PST) I was too quick to the gun, the change appears to be between Rack 1.4.1 and 1.4.2. Pinning my application to rack 1.4.1 and it works well with kgio 2.8.0 and rainbows 4.4.3. Frustrating. Broken here: https://github.com/rack/rack/commit/18ff5d4a70c93a49de62a359986c1567cb4bf00d On Fri, Jan 18, 2013 at 4:21 PM, W. Andrew Loe III wrote: > 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