$last_clean = 0; # last time we did a clean
@forward = (); # msg forward table
$timeout = 30*60; # forwarding timeout
-$waittime = 60*60; # time an aborted outgoing message waits before trying again
-$queueinterval = 2*60; # run the queue every 2 minutes
+$waittime = 30*60; # time an aborted outgoing message waits before trying again
+$queueinterval = 1*60; # run the queue every 1 minute
$lastq = 0;
# this is periodic processing
if (!$self || !$line) {
- # wander down the work queue stopping any messages that have timed out
- for (keys %busy) {
- my $node = $_;
- my $ref = $busy{$_};
- if (exists $ref->{lastt} && $main::systime > $ref->{lastt} + $timeout) {
- dbg('msg', "Timeout, stopping msgno: $ref->{msgno} -> $node");
- $ref->stop_msg($node);
+ if ($main::systime > $lastq + $queueinterval) {
- # delay any outgoing messages that fail
- $ref->{waitt} = $main::systime + $waittime + rand(120) if $node ne $main::mycall;
+ # wander down the work queue stopping any messages that have timed out
+ for (keys %busy) {
+ my $node = $_;
+ my $ref = $busy{$_};
+ if (exists $ref->{lastt} && $main::systime >= $ref->{lastt} + $timeout) {
+ dbg('msg', "Timeout, stopping msgno: $ref->{msgno} -> $node");
+ $ref->stop_msg($node);
+
+ # delay any outgoing messages that fail
+ $ref->{waitt} = $main::systime + $waittime + rand(120) if $node ne $main::mycall;
+ }
}
- }
- # queue some message if the interval timer has gone off
- if ($main::systime > $lastq + $queueinterval) {
+ # queue some message if the interval timer has gone off
queue_msg(0);
$lastq = $main::systime;
}
$ref->stop_msg($self->call);
$ref = undef;
}
-
last SWITCH;
}
} elsif ($self->state eq 'sendbody') {
confess "local var gone missing" if !ref $self->{loc};
my $loc = $self->{loc};
- if ($line eq "\032" || uc $line eq "/EX") {
+ if ($line eq "\032" || $line eq '%1A' || uc $line eq "/EX") {
my $to;
if (@{$loc->{lines}} > 0) {