You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by ar...@apache.org on 2011/03/14 17:12:29 UTC

svn commit: r1081437 - /incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm

Author: arkurth
Date: Mon Mar 14 16:12:29 2011
New Revision: 1081437

URL: http://svn.apache.org/viewvc?rev=1081437&view=rev
Log:
VCL-434
Fixed minor bug in State.pm::DESTROY.  A "Use of uninitialized value in subtraction" error would be displayed when exiting vcld -setup because the $self->{start_time} variable isn't initialized when running setup mode.

Modified:
    incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm

Modified: incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm
URL: http://svn.apache.org/viewvc/incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm?rev=1081437&r1=1081436&r2=1081437&view=diff
==============================================================================
--- incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm (original)
+++ incubator/vcl/trunk/managementnode/lib/VCL/Module/State.pm Mon Mar 14 16:12:29 2011
@@ -871,9 +871,10 @@ sub DESTROY {
 	$self->SUPER::DESTROY if $self->can("SUPER::DESTROY");
 	
 	# Determine how long process took to run
-	my $duration = (time - $self->{start_time});
-	
-	notify($ERRORS{'OK'}, 0, ref($self) . " process duration: $duration seconds");
+	if ($self->{start_time}) {
+		my $duration = (time - $self->{start_time});
+		notify($ERRORS{'OK'}, 0, ref($self) . " process duration: $duration seconds");
+	}
 } ## end sub DESTROY
 
 #/////////////////////////////////////////////////////////////////////////////