2
0
Эх сурвалжийг харах

fix: Avoid opening read connections without mutexes

Jayson Reis 3 жил өмнө
parent
commit
09b8cde6aa

+ 2 - 2
Emby.Server.Implementations/Data/BaseSqliteRepository.cs

@@ -103,8 +103,8 @@ namespace Emby.Server.Implementations.Data
         {
         {
             if (readOnly)
             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();
             WriteLock.Wait();