--- loncom/loncron 2017/02/28 05:42:06 1.104 +++ loncom/loncron 2017/10/20 11:54:54 1.105 @@ -2,7 +2,7 @@ # Housekeeping program, started by cron, loncontrol and loncron.pl # -# $Id: loncron,v 1.104 2017/02/28 05:42:06 raeburn Exp $ +# $Id: loncron,v 1.105 2017/10/20 11:54:54 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -646,9 +646,15 @@ sub check_delayed_msg { my $unsend=0; + my %hostname = &Apache::lonnet::all_hostnames(); + my $numhosts = scalar(keys(%hostname)); + my $dfh=IO::File->new("$perlvar{'lonDaemons'}/logs/lonnet.perm.log"); while (my $line=<$dfh>) { my ($time,$sdf,$dserv,$dcmd)=split(/:/,$line); + if ($numhosts) { + next unless ($hostname{$dserv}); + } if ($sdf eq 'F') { my $local=localtime($time); &log($fh,"Failed: $time, $dserv, $dcmd
"); @@ -675,8 +681,6 @@ sub check_delayed_msg { } &log($fh,"\n"); close (DFH); - my %hostname = &Apache::lonnet::all_hostnames(); - my $numhosts = scalar(keys(%hostname)); # pong to all servers that have delayed messages # this will trigger a reverse connection, which should flush the buffers foreach my $tryserver (sort(keys(%servers))) {