From 95d6016b58fae052692f11f4bc38bc130807c4fd Mon Sep 17 00:00:00 2001 From: liyi Date: Thu, 12 Dec 2024 16:06:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=94=80=E6=AF=81=E6=98=9F=E5=9B=BE?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E6=97=B6=E5=90=8C=E6=97=B6=E6=B8=85=E9=99=A4?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/talk/startChart/start_chart_manage.dart | 4 +++- lib/tools/storage.dart | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/lib/talk/startChart/start_chart_manage.dart b/lib/talk/startChart/start_chart_manage.dart index 63d66256..bcdd41f5 100644 --- a/lib/talk/startChart/start_chart_manage.dart +++ b/lib/talk/startChart/start_chart_manage.dart @@ -776,10 +776,12 @@ class StartChartManage { } /// 销毁资源 - void destruction() { + void destruction() async { stopTalkExpectMessageTimer(); stopTalkPingMessageTimer(); stopHeartbeat(); stopReStartOnlineStartChartServer(); + await Storage.removerRelayInfo(); + await Storage.removerStarChartRegisterNodeInfo(); } } diff --git a/lib/tools/storage.dart b/lib/tools/storage.dart index 9b9aff0c..41589252 100755 --- a/lib/tools/storage.dart +++ b/lib/tools/storage.dart @@ -251,6 +251,16 @@ class Storage { return starChartRegisterNodeEntity; } + // 删除节点注册信息 + static Future removerStarChartRegisterNodeInfo() async { + removeData(starChartRegisterNodeInfo); + } + + // 删除节点注册信息 + static Future removerRelayInfo() async { + removeData(relayInfo); + } + // 保存星图注册节点信息 static Future saveStarChartRegisterNodeInfo( StarChartRegisterNodeEntity starChartRegisterNodeEntity) async {