fix:销毁星图资源时同时清除缓存

This commit is contained in:
liyi 2024-12-12 16:06:28 +08:00
parent 16ca0a012c
commit 95d6016b58
2 changed files with 13 additions and 1 deletions

View File

@ -776,10 +776,12 @@ class StartChartManage {
}
///
void destruction() {
void destruction() async {
stopTalkExpectMessageTimer();
stopTalkPingMessageTimer();
stopHeartbeat();
stopReStartOnlineStartChartServer();
await Storage.removerRelayInfo();
await Storage.removerStarChartRegisterNodeInfo();
}
}

View File

@ -251,6 +251,16 @@ class Storage {
return starChartRegisterNodeEntity;
}
//
static Future<void> removerStarChartRegisterNodeInfo() async {
removeData(starChartRegisterNodeInfo);
}
//
static Future<void> removerRelayInfo() async {
removeData(relayInfo);
}
//
static Future<void> saveStarChartRegisterNodeInfo(
StarChartRegisterNodeEntity starChartRegisterNodeEntity) async {