Permalink
Browse files

Merge pull request #295 from xaicron/master

added backlog option
  • Loading branch information...
2 parents 6f3cb0c + 8baafe7 commit 52c7e8f112f30fb344e364e12baf98cb6d4ee467 @miyagawa miyagawa committed Jun 21, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/Plack/Handler/FCGI.pm
@@ -21,6 +21,7 @@ sub new {
$self->{nproc} ||= 1 unless blessed $self->{manager};
$self->{pid} ||= $self->{pidfile}; # compatibility
$self->{listen} ||= [ ":$self->{port}" ] if $self->{port}; # compatibility
+ $self->{backlog} ||= 100;
$self->{manager} = 'FCGI::ProcManager' unless exists $self->{manager};
$self;
@@ -38,7 +39,7 @@ sub run {
unless ($self->{leave_umask}) {
umask(0);
}
- $sock = FCGI::OpenSocket( $self->{listen}->[0], 100 )
+ $sock = FCGI::OpenSocket( $self->{listen}->[0], $self->{backlog} )
or die "failed to open FastCGI socket: $!";
unless ($self->{leave_umask}) {
umask($old_umask);
@@ -280,6 +281,10 @@ Specify process title
Send STDERR to STDOUT instead of the webserver
+=item backlog
+
+Maximum length of the queue of pending connections
+
=back
=head2 WEB SERVER CONFIGURATIONS

0 comments on commit 52c7e8f

Please sign in to comment.