From a178628cbb7364319cf7c27bc0270545015be5ea Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Mon, 13 Aug 2007 12:25:55 +0000 Subject: only push data when there is data --- lib/Smokeping/Slave.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Smokeping/Slave.pm b/lib/Smokeping/Slave.pm index a80eae3..533201e 100644 --- a/lib/Smokeping/Slave.pm +++ b/lib/Smokeping/Slave.pm @@ -66,7 +66,7 @@ sub submit_results { $store .= ".cache"; my $restore = retrieve $store if -f $store; my $data = get_results($slave_cfg, $cfg, $probes, $cfg->{Targets}, '', $myprobe); - push @$data, @$restore; + push @$data, @$restore if $restore; my $data_dump = join "\n",@{$data}; my $ua = LWP::UserAgent->new( agent => 'smokeping-slave/1.0', -- cgit v1.2.3-24-g4f1b