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=1.8 required=3.0 tests=AWL,FROM_LOCAL_NOVOWEL, MSGID_FROM_MTA_HEADER,RDNS_NONE shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Thorsten von Eicken Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: Re: HUP restart is delayed by 2 minutes Date: Wed, 29 Jan 2014 14:41:24 -0800 Organization: RightScale, Inc. Message-ID: <52E98394.1040800@rightscale.com> References: <52E89997.6020504@rightscale.com> <20140129070259.GA5938@dcvr.yhbt.net> <52E8AD1B.8090009@rightscale.com> <20140129083147.GA26652@dcvr.yhbt.net> <52E9607A.60107@rightscale.com> <20140129220352.GA24393@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 1391035283 27437 80.91.229.3 (29 Jan 2014 22:41:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Jan 2014 22:41:23 +0000 (UTC) To: "Rainbows! list" Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Wed Jan 29 23:41:30 2014 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 X-Greylist: delayed 58311 seconds by postgrey-1.31 at rubyforge; Wed, 29 Jan 2014 22:41:27 UTC X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:organization:user-agent :mime-version:to:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=eG0jWvCi4huPmoTvusvo9jIeheyA7E1J/DTv+4nhkdc=; b=e2EfhbADHaOOSQAb/GCE0qsPB2UJFi/S+gg+LRWY0G3IotbBw3Y1AO5mZ9Wa58KuyM GY7RLvtHLZdGE54g2JijqK/L685qxCd58KWy0S/zIvnzBpuL95V44YLKzxFUXobzgk8X cmJ5U5sJwOpc3Y31vD7T4ZnrGB1/P6w0IVDVIDV3BgOi1oDsqpjAF3VjrEyX7XB/Tcl1 7Zol9qdZ4I5zZ4407p8KO+tv6GQL0nzwR+VsJTl8OjGq6+LUe+ARmxzWMr8nVJ5ceEbK T1PLEktpGLTg8QM6KQ+T1gkg9GRzBG7Mu/XtxW2zwIbMJGW8lijVlV39GQ80u24fJZ+2 dvWQ== X-Gm-Message-State: ALoCoQnbw4a+4OSgDE0mOrmPecBJUkfWs3xZa37B6UKVoTp+/mVNGLXr/FTn3AlFs5lrB9RaS5kn X-Received: by 10.68.212.10 with SMTP id ng10mr10806987pbc.95.1391035285744; Wed, 29 Jan 2014 14:41:25 -0800 (PST) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 In-Reply-To: <20140129220352.GA24393-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org> X-Enigmail-Version: 1.6 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 X-Broken-Reverse-DNS: no host name found for IP address 50.56.192.79 Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:587 Archived-At: Received: from [50.56.192.79] (helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W8dp3-0006H1-Qq for gclrrg-rainbows-talk@m.gmane.org; Wed, 29 Jan 2014 23:41:30 +0100 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 019A82E183; Wed, 29 Jan 2014 22:41:29 +0000 (UTC) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by rubyforge.org (Postfix) with ESMTP id D200926307F for ; Wed, 29 Jan 2014 22:41:27 +0000 (UTC) Received: by mail-pb0-f51.google.com with SMTP id un15so2352573pbc.38 for ; Wed, 29 Jan 2014 14:41:25 -0800 (PST) Received: from [192.168.0.2] (sb0-cf9a657f.dsl.impulse.net. [207.154.101.127]) by mx.google.com with ESMTPSA id vx10sm26350789pac.17.2014.01.29.14.41.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 29 Jan 2014 14:41:24 -0800 (PST) On 1/29/2014 2:03 PM, Eric Wong wrote: > Thanks! Can you try this? Sorry I haven't maintained EM support > well, I forgot some versions were broken under Ruby 2.x :x > > (also "gem install --pre -v 4.6.0.4.g4108 rainbows" should work) > > --- a/lib/rainbows/event_machine.rb > +++ b/lib/rainbows/event_machine.rb > @@ -88,7 +88,17 @@ module Rainbows::EventMachine > raise RuntimeError, "EM @conns instance variable not accessible!" > Rainbows::EventMachine::Server.const_set(:CUR, conns) > Rainbows.at_quit do > - EM.next_tick { conns.each_value { |c| client_class === c and c.quit } } > + EM.next_tick do > + LISTENERS.clear > + conns.each_value do |c| > + case c > + when client_class > + c.quit > + when Rainbows::EventMachine::Server > + c.detach > + end > + end > + end > end > EM.add_periodic_timer(1) do > EM.stop if ! Rainbows.tick && conns.empty? && EM.reactor_running? > This indeed seems to fix it! Thanks much! _______________________________________________ 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