mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
opt: optimize cm ui & timer & auto close
Signed-off-by: Kingtous <kingtous@qq.com>
This commit is contained in:
@@ -342,6 +342,10 @@ class ServerModel with ChangeNotifier {
|
||||
var res = await bind.mainGetClientsState();
|
||||
try {
|
||||
final List clientsJson = jsonDecode(res);
|
||||
if (isDesktop && clientsJson.isEmpty && _clients.isNotEmpty) {
|
||||
// exit cm when >1 peers to no peers
|
||||
exit(0);
|
||||
}
|
||||
_clients.clear();
|
||||
for (var clientJson in clientsJson) {
|
||||
final client = Client.fromJson(clientJson);
|
||||
|
||||
Reference in New Issue
Block a user