From 7e192a44f5773d56284ec912f585d41f9d47d615 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 17 Jul 2019 12:48:45 +0200 Subject: [PATCH] followup: code cleanup Signed-off-by: Thomas Lamprecht --- data/PVE/API2/ClusterConfig.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/data/PVE/API2/ClusterConfig.pm b/data/PVE/API2/ClusterConfig.pm index 0daa9e7..83053db 100644 --- a/data/PVE/API2/ClusterConfig.pm +++ b/data/PVE/API2/ClusterConfig.pm @@ -173,9 +173,10 @@ my $config_change_lock = sub { my $members = PVE::Cluster::get_members(); if (scalar(keys %$members) > 1) { my $res = PVE::Cluster::cfs_lock_file('corosync.conf', 10, $code); - # cfs_lock_file only sets $@ - # lock_file does not propagate $@ unless we die here + + # cfs_lock_file only sets $@ but lock_file doesn't propagates $@ unless we die here die $@ if defined($@); + return $res; } else { return $code->(); -- 2.39.5