refactor: 热重载
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s
Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s

This commit is contained in:
手瓜一十雪 committed 2024-11-25 15:16:12 +08:00
1 parent 74a316e758
commit 01d11d6213
3 files changed
+23 -51

No files matched your search

+8
View File
@@ -68,6 +68,14 @@ export class OB11NetworkManager {
await adapter.close();
}
}
async closeSomeAdaterWhenOpen(adaptersToClose: IOB11NetworkAdapter[]) {
for (const adapter of adaptersToClose) {
this.adapters.delete(adapter.name);
if(adapter.isEnable){
await adapter.close();
}
}
}
findSomeAdapter(name: string) {
return this.adapters.get(name);