Skip to content

Commit

Permalink
$loop is not actually used anywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Mar 4, 2016
1 parent ccc5931 commit 72dd2fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/Mojo/Server/Daemon.pm
Expand Up @@ -46,9 +46,10 @@ sub run {
sub start {
my $self = shift;

# Resume accepting connections
my $loop = $self->ioloop;
if (my $max = $self->max_clients) { $loop->max_connections($max) }

# Resume accepting connections
if (my $servers = $self->{servers}) {
push @{$self->acceptors}, $loop->acceptor(delete $servers->{$_})
for keys %$servers;
Expand Down
4 changes: 1 addition & 3 deletions lib/Mojo/Server/Prefork.pm
Expand Up @@ -62,9 +62,6 @@ sub run {
# No Windows support
say 'Preforking is not available for Windows.' and exit 0 if $^O eq 'MSWin32';

# Prepare event loop
my $loop = $self->ioloop->max_accepts($self->accepts);

# Pipe for worker communication
pipe($self->{reader}, $self->{writer}) or die "Can't create pipe: $!";

Expand All @@ -86,6 +83,7 @@ sub run {

# Preload application before starting workers
$self->start->app->log->info("Manager $$ started");
$self->ioloop->max_accepts($self->accepts);
$self->{running} = 1;
$self->_manage while $self->{running};
}
Expand Down

0 comments on commit 72dd2fe

Please sign in to comment.