summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/hyperstack/cli.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/hyperstack/cli.rb b/lib/hyperstack/cli.rb
index 479f1c3..b1f0ca6 100644
--- a/lib/hyperstack/cli.rb
+++ b/lib/hyperstack/cli.rb
@@ -300,8 +300,10 @@ module HyperstackVM
rescue Error => e
errors_mutex.synchronize { errors[:vm1] = e.message }
# Unblock VM2 even if VM1 failed so the process doesn't hang.
+ # Only set the error flag if the WireGuard step itself failed.
+ # If WG already succeeded (:done is true), VM2 should proceed.
wg_mutex.synchronize do
- vm1_wg_state[:error] = e.message
+ vm1_wg_state[:error] = e.message unless vm1_wg_state[:done]
wg_cv.broadcast
end
end