Revert "chore: Add a read only connection for routes like Shows/NextUp"

This commit is contained in:
Cody Robibero
2022-03-06 09:30:47 -07:00
committed by GitHub
parent 973781c482
commit 0a8bec1af4
2 changed files with 4 additions and 12 deletions

View File

@@ -98,16 +98,8 @@ namespace Emby.Server.Implementations.Data
/// <value>The write connection.</value>
protected SQLiteDatabaseConnection WriteConnection { get; set; }
protected SQLiteDatabaseConnection ReadConnection { get; set; }
protected ManagedConnection GetConnection(bool readOnly = false)
{
if (readOnly)
{
ReadConnection ??= SQLite3.Open(DbFilePath, ConnectionFlags.ReadOnly, null);
return new ManagedConnection(ReadConnection, null);
}
WriteLock.Wait();
if (WriteConnection != null)
{