fix: Avoid opening read connections without mutexes

pull/7240/head
Jayson Reis 3 years ago
parent 2e4dd02f76
commit 09b8cde6aa

@ -103,8 +103,8 @@ namespace Emby.Server.Implementations.Data
{ {
if (readOnly) if (readOnly)
{ {
ReadConnection ??= SQLite3.Open(DbFilePath, DefaultConnectionFlags | ConnectionFlags.ReadOnly, null); ReadConnection ??= SQLite3.Open(DbFilePath, ConnectionFlags.ReadOnly, null);
return new ManagedConnection(ReadConnection, null); return new ManagedConnection(ReadConnection, null!);
} }
WriteLock.Wait(); WriteLock.Wait();

Loading…
Cancel
Save