fix: Avoid opening read connections without mutexes

This commit is contained in:
Jayson Reis 2022-01-23 11:59:12 +01:00
parent 2e4dd02f76
commit 09b8cde6aa
1 changed files with 2 additions and 2 deletions

View File

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