refactor core_main, also fix windows flutter restart repeated fatal

error crash
This commit is contained in:
rustdesk
2022-09-15 17:41:10 +08:00
parent 5b4357b8c4
commit f4871a992f
8 changed files with 197 additions and 240 deletions

View File

@@ -259,7 +259,6 @@ class ServerModel with ChangeNotifier {
Future<Null> startService() async {
_isStart = true;
notifyListeners();
// TODO
parent.target?.ffiModel.updateEventListener("");
await parent.target?.invokeMethod("init_service");
await bind.mainStartService();
@@ -274,7 +273,6 @@ class ServerModel with ChangeNotifier {
/// Stop the screen sharing service.
Future<Null> stopService() async {
_isStart = false;
// TODO
closeAll();
await parent.target?.invokeMethod("stop_service");
await bind.mainStopService();