+
+ # this is periodic processing
+ if (undef $self || undef $line) {
+
+ # wander down the work queue stopping any messages that have timed out
+ for (keys %work) {
+ my $ref = $work{$_};
+ if ($main::systime > $ref->{lastt} + $timeout) {
+ my $tonode = $ref->{tonode};
+ $ref->stop_msg();
+
+ # delay any outgoing messages that fail
+ $ref->{waitt} = $main::systime + $waittime if $tonode ne $main::mycall;
+ }
+ }
+
+ # clean the message queue
+ clean_old() if $main::systime - $last_clean > 3600 ;
+ return;
+ }
+