]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - scripts/find-alive.pl
SourceFormat Enforcement
[thirdparty/squid.git] / scripts / find-alive.pl
index 21438bc4e98c953253cc87ba3b87738dfb373b90..4a04cb677741578d941faac74164e253b33cb08b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 #
-## Copyright (C) 1996-2016 The Squid Software Foundation and contributors
+## Copyright (C) 1996-2017 The Squid Software Foundation and contributors
 ##
 ## Squid software is distributed under GPLv2+ license and includes
 ## contributions from numerous individuals and organizations.
@@ -97,8 +97,12 @@ while (<STDIN>) {
        } 
        elsif (my @deIds = (/$reDestructor/)) {
                my $id = join(':', @deIds);
-               #warn("unborn: $_") unless $AliveCount{$id};
-               $AliveImage{$id} = undef() unless --$AliveCount{$id};
+               if ($AliveCount{$id}) {
+                       $AliveImage{$id} = undef() unless --$AliveCount{$id};
+               } else {
+                       #warn("unborn: $_");
+                       # do nothing; we are probably looking at a partial log
+               }
        }
 }