Browse files

Countup internal request count in keep-alived session

  • Loading branch information...
1 parent 7b4430d commit daa0174260a8935b5acaaf3761943b09974b26b4 @cho45 cho45 committed May 26, 2010
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/Starman/Server.pm
View
3 lib/Starman/Server.pm
@@ -144,6 +144,7 @@ sub process_request {
or die $!;
}
+ $self->{server}->{requests}--; # decrement count on connection
while ( $self->{client}->{keepalive} ) {
last if !$conn->connected;
@@ -168,6 +169,8 @@ sub process_request {
'psgix.input.buffered' => Plack::Util::TRUE,
};
+ $self->{server}->{requests}++;
+
# Parse headers
my $reqlen = parse_http_request(delete $self->{client}->{headerbuf}, $env);
if ( $reqlen == -1 ) {

0 comments on commit daa0174

Please sign in to comment.