From 621b955fb83ddb1c05c8e29b97a4c785492d4606 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 28 Jun 2017 09:02:29 +0200 Subject: [PATCH] replication: sort time stamps numerically --- PVE/ReplicationState.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/ReplicationState.pm b/PVE/ReplicationState.pm index b817f08..74c95f9 100644 --- a/PVE/ReplicationState.pm +++ b/PVE/ReplicationState.pm @@ -299,7 +299,7 @@ sub get_next_job { my $jobb = $jobs->{$b}; my $sa = $joba->{state}; my $sb = $jobb->{state}; - my $res = $sa->{last_iteration} cmp $sb->{last_iteration}; + my $res = $sa->{last_iteration} <=> $sb->{last_iteration}; return $res if $res != 0; $res = $joba->{next_sync} <=> $jobb->{next_sync}; return $res if $res != 0; -- 2.39.2