Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
From: Thorsten von Eicken <tve-nkzjiHSqi6rZJqsBc5GL+g@public.gmane.org>
To: "Rainbows! list" <rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org>
Subject: Re: HUP restart is delayed by 2 minutes
Date: Wed, 29 Jan 2014 14:41:24 -0800	[thread overview]
Message-ID: <52E98394.1040800@rightscale.com> (raw)
In-Reply-To: <20140129220352.GA24393-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>

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


  parent reply	other threads:[~2014-01-29 22:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29  6:03 HUP restart is delayed by 2 minutes Thorsten von Eicken
     [not found] ` <52E89997.6020504-nkzjiHSqi6rZJqsBc5GL+g@public.gmane.org>
2014-01-29  7:02   ` Eric Wong
     [not found]     ` <20140129070259.GA5938-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2014-01-29  7:26       ` Thorsten von Eicken
     [not found]         ` <52E8AD1B.8090009-nkzjiHSqi6rZJqsBc5GL+g@public.gmane.org>
2014-01-29  7:32           ` Eric Wong
2014-01-29  8:31           ` Eric Wong
     [not found]             ` <20140129083147.GA26652-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2014-01-29 20:11               ` Thorsten von Eicken
     [not found]                 ` <52E9607A.60107-nkzjiHSqi6rZJqsBc5GL+g@public.gmane.org>
2014-01-29 22:03                   ` Eric Wong
     [not found]                     ` <20140129220352.GA24393-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2014-01-29 22:41                       ` Thorsten von Eicken [this message]
2014-03-17 21:23                       ` Thorsten von Eicken
     [not found]                         ` <532767E2.70509-nkzjiHSqi6rZJqsBc5GL+g@public.gmane.org>
2014-03-17 21:27                           ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/rainbows/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52E98394.1040800@rightscale.com \
    --to=tve-nkzjihsqi6rzjqsbc5gl+g@public.gmane.org \
    --cc=rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/rainbows.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).