Skip to content

Commit

Permalink
fixed Mojo::Server::Daemon::Prefork not to prefork more workers than …
Browse files Browse the repository at this point in the history
…allowed
  • Loading branch information
kraih committed Aug 22, 2010
1 parent 3ef7fca commit 5213103
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Changes
Expand Up @@ -11,6 +11,8 @@ This file documents the revision history for Perl extension Mojolicious.
- Fixed a bug where Mojo::IOLoop connections could be closed too
early.
- Fixed HTTPS support for CGI environments.
- Fixed Mojo::Server::Daemon::Prefork not to prefork more workers
than allowed.

0.999929 2010-08-17 00:00:00
- Removed OS X resource fork files.
Expand Down
5 changes: 4 additions & 1 deletion lib/Mojo/Server/Daemon/Prefork.pm
Expand Up @@ -116,7 +116,10 @@ sub run {
$self->app->log->debug('Prefork parent started.') if DEBUG;

# Prefork
$self->_spawn_child for (1 .. $self->start_servers);
my $start = $self->start_servers;
my $max = $self->max_servers;
$start = $max if $max < $start;
$self->_spawn_child for 1 .. $start;

# We try to make spawning and killing as smooth as possible
$self->{_cleanup} = time + $self->cleanup_interval;
Expand Down

0 comments on commit 5213103

Please sign in to comment.