perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject cvs commit: modperl-2.0/t/response/TestError runtime.pm
Date Thu, 10 Jun 2004 13:34:41 GMT
stas        2004/06/10 06:34:41

  Modified:    t/response/TestError runtime.pm
  Log:
  throw in some retry attempts
  
  Revision  Changes    Path
  1.6       +10 -2     modperl-2.0/t/response/TestError/runtime.pm
  
  Index: runtime.pm
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/t/response/TestError/runtime.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -u -r1.5 -r1.6
  --- runtime.pm	9 Jun 2004 14:46:22 -0000	1.5
  +++ runtime.pm	10 Jun 2004 13:34:41 -0000	1.6
  @@ -74,9 +74,17 @@
   
   sub eval_block_mp_error {
       my($r, $socket) = @_;
  -    eval { mp_error($socket) };
  +
  +    # throw in some retry attempts
  +    my $tries = 0;
  +    RETRY: eval { mp_error($socket) };
       if ($@ && ref($@) && $@ == APR::TIMEUP) {
  -        $r->print("ok eval_block_mp_error");
  +        if ($tries++ < 3) {
  +            goto RETRY;
  +        }
  +        else {
  +            $r->print("ok eval_block_mp_error");
  +        }
       }
       else {
           die "eval block has failed: $@";
  
  
  

Mime
View raw message