mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
fix: do not try to reset machine when removing unreachable machine
This commit is contained in:
1 parent
fc0bf4a91b
commit
6c244bb8f9
3 files changed
+13
-16
No files matched your search
@@ -446,10 +446,7 @@ func (m *Machine) Run(ctx context.Context) error {
|
||||
slog.Info("Local API proxy server stopped.")
|
||||
|
||||
// Clean up the machine data and resources if the machine shutdown was initiated by a reset.
|
||||
m.mu.RLock()
|
||||
resetting := m.resetting
|
||||
m.mu.RUnlock()
|
||||
if resetting {
|
||||
if m.resetting {
|
||||
slog.Info("Cleaning up machine data and resources.")
|
||||
if err = m.cleanup(); err != nil {
|
||||
slog.Error("Failed to clean up machine data and resources.", "err", err)
|
||||
|
||||
Reference in new issue
Block a user