mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-18 06:13:42 +00:00
fix: ffi instance be singleton
This commit is contained in:
1 parent
91dfd78b77
commit
4b4c03fd90
18 files changed
+844
-5336
No files matched your search
@@ -73,10 +73,11 @@ Future<void> init(Args args) async {
|
||||
|
||||
final controller = Get.put(AppController());
|
||||
try {
|
||||
await LibgopeedBoot.instance.init(StartConfig(
|
||||
final instance = await LibgopeedBoot().init(StartConfig(
|
||||
storage: "bolt",
|
||||
storageDir: Util.getStorageDir(),
|
||||
));
|
||||
LibgopeedBoot.singleton(instance);
|
||||
} catch (e) {
|
||||
logger.e("libgopeed init fail", e);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user