Skip to content

Commit

Permalink
Fix a bug that --manager option is ignored with Server::Starter
Browse files Browse the repository at this point in the history
  • Loading branch information
Haruka Iwao committed Oct 30, 2013
1 parent 4bb93b8 commit 7136495
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Plack/Handler/FCGI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,12 @@ sub new {
sub run {
my ($self, $app) = @_;

my $running_on_server_starter = exists $ENV{SERVER_STARTER_PORT};
my $sock = 0;
if (-S STDIN) {
# running from web server. Do nothing
# Note it should come before listen check because of plackup's default
} elsif ($ENV{SERVER_STARTER_PORT}) {
} elsif ($running_on_server_starter) {
# Runing under Server::Starter
require Server::Starter;
my %socks = %{Server::Starter::server_ports()};
Expand Down Expand Up @@ -68,7 +69,7 @@ sub run {

my $proc_manager;

if ($self->{listen}) {
if ($self->{listen} or $running_on_server_starter) {
$self->daemon_fork if $self->{daemonize};

if ($self->{manager}) {
Expand Down

0 comments on commit 7136495

Please sign in to comment.