From b736286d16b3c0e310df106f727ca2143a000e08 Mon Sep 17 00:00:00 2001 From: minima Date: Fri, 27 Oct 2000 22:01:07 +0000 Subject: [PATCH] alter the hourly cleanup code in DXMsg to see whether that works better. --- perl/DXMsg.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl/DXMsg.pm b/perl/DXMsg.pm index 55834fc3..2de6a22a 100644 --- a/perl/DXMsg.pm +++ b/perl/DXMsg.pm @@ -458,7 +458,7 @@ sub del_msg my $self = shift; # remove it from the active message list - @msg = map { $_ != $self ? $_ : () } @msg; + @msg = grep { $ref($_) && $_ != $self } @msg; # belt and braces (one day I will ask someone if this is REALLY necessary) delete $self->{gotit}; @@ -476,7 +476,7 @@ sub clean_old # mark old messages for deletion foreach $ref (@msg) { - if (!$ref->{keep} && $ref->{t} < $main::systime - $maxage) { + if (ref($ref) && !$ref->{keep} && $ref->{t} < $main::systime - $maxage) { $ref->{deleteme} = 1; delete $ref->{gotit}; delete $ref->{list}; @@ -486,7 +486,7 @@ sub clean_old } # remove them all from the active message list - @msg = map { $_->{deleteme} ? () : $_ } @msg; + @msg = grep { ref($_) && !$_->{deleteme} } @msg; $last_clean = $main::systime; } -- 2.43.0