The Free Software Media System - Server Backend & API
fix: Avoid opening read connections without mutexes
Jayson Reis09b8cde6aa41
diff --git a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs b/Emby.Server.Implementations/Data/BaseSqliteRepository.csindex 3ca9977c85..3387dbec9d 100644--- a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs+++ b/Emby.Server.Implementations/Data/BaseSqliteRepository.cs@@ -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();