Skip to content

Commit

Permalink
remove unused legacy code
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed May 30, 2011
1 parent 45fcece commit 73a11ef
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/HTTP/Server/PSGI.pm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ sub new {
timeout => $args{timeout} || 300,
server_software => $args{server_software} || $class,
server_ready => $args{server_ready} || sub {},
max_reqs_per_child => $args{max_reqs_per_child} || 100,
}, $class;

if ($args{max_workers} && $args{max_workers} > 1) {
Expand Down Expand Up @@ -73,18 +72,15 @@ sub setup_listener {
}

sub accept_loop {
# TODO handle $max_reqs_per_child
my($self, $app, $max_reqs_per_child) = @_;
my $proc_req_count = 0;
my($self, $app) = @_;

$app = Plack::Middleware::ContentLength->wrap($app);

while (! defined $max_reqs_per_child || $proc_req_count < $max_reqs_per_child) {
while (1) {
local $SIG{PIPE} = 'IGNORE';
if (my $conn = $self->{listen_sock}->accept) {
$conn->setsockopt(IPPROTO_TCP, TCP_NODELAY, 1)
or die "setsockopt(TCP_NODELAY) failed:$!";
++$proc_req_count;
my $env = {
SERVER_PORT => $self->{port},
SERVER_NAME => $self->{host},
Expand Down

0 comments on commit 73a11ef

Please sign in to comment.