An open-source remote desktop application designed for self-hosting, as an alternative to TeamViewer.
Rust androidanydeskdartflatpakflutterflutter-appsioslinuxmacosp2prdpremote-controlremote-desktoprustrust-langteamviewervncwaylandwindows
fix, flutter, peer info event may be changed accidentally
fufesou1d3ce2c02951
diff --git a/flutter/lib/models/model.dart b/flutter/lib/models/model.dartindex b1a270718..0bc22790a 100644--- a/flutter/lib/models/model.dart+++ b/flutter/lib/models/model.dart@@ -628,7 +628,9 @@ class FfiModel with ChangeNotifier {/// Handle the peer info event based on [evt].handlePeerInfo(Map<String, dynamic> evt, String peerId, bool isCache) async {- cachedPeerData.peerInfo = evt;+ // Map clone is required here, otherwise "evt" may be changed by other threads through the reference.+ // Because this function is asynchronous, there's an "await" in this function.+ cachedPeerData.peerInfo = {...evt};// recent peer updated by handle_peer_info(ui_session_interface.rs) --> handle_peer_info(client.rs) --> save_config(client.rs)bind.mainLoadRecentPeers();