Author: sparky
Date: Sat Jun 26 02:06:59 2010
New Revision: 11580

Modified:
   toys/rsget.pl/RSGet/Dispatch.pm
   toys/rsget.pl/RSGet/Main.pm
Log:
- improved DELAY() support - restart even if nothing else is
  goning on at the moment


Modified: toys/rsget.pl/RSGet/Dispatch.pm
==============================================================================
--- toys/rsget.pl/RSGet/Dispatch.pm     (original)
+++ toys/rsget.pl/RSGet/Dispatch.pm     Sat Jun 26 02:06:59 2010
@@ -63,6 +63,14 @@
        die "No working interfaces left\n" unless @interfaces;
 }
 
+my $delay_check;
+sub delay_check
+{
+       return unless $delay_check and $delay_check <= time;
+       RSGet::FileList::update();
+       $delay_check = undef;
+}
+
 my %last_used;
 
 sub find_free_if
@@ -158,6 +166,9 @@
                } elsif ( $options->{delay} < time ) {
                        delete $options->{delay};
                        delete $options->{error};
+               } else {
+                       $delay_check = $options->{delay}
+                               if not $delay_check or $delay_check > 
$options->{delay};
                }
        }
        return if $options->{error};

Modified: toys/rsget.pl/RSGet/Main.pm
==============================================================================
--- toys/rsget.pl/RSGet/Main.pm (original)
+++ toys/rsget.pl/RSGet/Main.pm Sat Jun 26 02:06:59 2010
@@ -292,6 +292,7 @@
 
 sub iteration_long
 {
+       RSGet::Dispatch::delay_check();
        RSGet::Wait::wait_update();
        RSGet::MortalObject::update();
        RSGet::Captcha::captcha_update();
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to