Skip to content

Commit

Permalink
- Make sure OCCore is actually removed when the last user returns it
Browse files Browse the repository at this point in the history
  • Loading branch information
felix-schwarz committed Apr 28, 2018
1 parent e5184c2 commit a7e0ded
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ownCloud/Core/CoreManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,13 @@ class CoreManager: NSObject {
if requestCount==0 {
// Stop and release core
if let core = coresByUUID[bookmark.uuid] {
coresByUUID.removeValue(forKey: bookmark.uuid)

core.stop(completionHandler: { (_, _) in
core.unregisterEventHandler()
completion?()
})

return
}
}
Expand Down

0 comments on commit a7e0ded

Please sign in to comment.