mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-28 04:24:20 +00:00
Fix DatabasePool.change(passphrase:)
This commit is contained in:
1 parent
04a6e969a5
commit
c7e4492846
1 file changed
+3
-2
@@ -243,10 +243,11 @@ extension DatabasePool {
|
||||
|
||||
/// Changes the passphrase of an encrypted database
|
||||
public func change(passphrase: String) throws {
|
||||
try readerPool.clear(andThen: {
|
||||
try readerPool.barrier {
|
||||
try writer.sync { try $0.change(passphrase: passphrase) }
|
||||
readerPool.removeAll()
|
||||
readerConfig.passphrase = passphrase
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user