Permalink
Browse files

Merge remote branch 'origin/destroy_listen_guards'

  • Loading branch information...
2 parents 987c95a + 78f0dd1 commit 7082de83c35d5e151bdadaede7736bdd8f672b75 @miyagawa committed Feb 16, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/Twiggy/Server.pm
View
@@ -527,7 +527,11 @@ sub run {
my $self = shift;
$self->register_service(@_);
- my $exit = $self->{exit_guard} = AE::cv;
+ my $exit = $self->{exit_guard} = AE::cv {
+ # Make sure that we are not listening on a socket anymore, while
+ # other events are being flushed
+ delete $self->{listen_guards};
+ };
$exit->begin;
my $w; $w = AE::signal QUIT => sub { $exit->end; undef $w };

0 comments on commit 7082de8

Please sign in to comment.