Skip to content

High performance self-hosted photo and video management solution.

fix: complete does not destroy engine on close (#21943)

shenlongd38468439b71
diff --git a/mobile/ios/Runner/Background/BackgroundWorker.swift b/mobile/ios/Runner/Background/BackgroundWorker.swift
index 9a965bd360..c3268b4a2b 100644
--- a/mobile/ios/Runner/Background/BackgroundWorker.swift
+++ b/mobile/ios/Runner/Background/BackgroundWorker.swift
@@ -133,7 +133,6 @@ class BackgroundWorker: BackgroundWorkerBgHostApi {
return
}
- isComplete = true
flutterApi?.cancel { result in
self.complete(success: false)
}
@@ -174,6 +173,7 @@ class BackgroundWorker: BackgroundWorkerBgHostApi {
isComplete = true
engine.destroyContext()
+ flutterApi = nil
completionHandler(success)
}
}