Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(remote-desktop): 保留安全设置恢复失败警告

Dashc5a18297e19b
diff --git a/apps/desktop/src/main/remote-desktop/controller.ts b/apps/desktop/src/main/remote-desktop/controller.ts
index c60e0a70c8..3962a3cee0 100644
--- a/apps/desktop/src/main/remote-desktop/controller.ts
+++ b/apps/desktop/src/main/remote-desktop/controller.ts
@@ -244,7 +244,12 @@ export class RemoteDesktopController {
this.deps.stopInput();
// Repairing just the input helper must not expose a privacy-masked desktop
// or unmute the host without the viewer seeing a settings change.
- const restoring = preserveSafety ? Promise.resolve() : this.clearSafety();
+ const restoring = preserveSafety
+ ? Promise.resolve()
+ : this.clearSafety().catch((error) => {
+ log.warn('Safety restoration failed after control loss', error);
+ throw error;
+ });
this.deps.changed();
return restoring;
}
@@ -623,10 +628,10 @@ export class RemoteDesktopController {
await this.revokeControl();
throw error;
}
- } catch {
+ } catch (error) {
// The viewer retains its picture and can retry via the normal permission
// path. No recursive restart if the replacement helper also fails.
- log.debug('Input recovery or safety restoration deferred');
+ if (recover) log.debug('Input recovery deferred', error);
}
}
/** Starts input for the lease's current display; shared by `control` and `autoControl`. */