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

@@ -9,13 +9,13 @@ namespace Emby.Server.Implementations.Data
{
public sealed class ManagedConnection : IDisposable
{
private readonly SemaphoreSlim? _writeLock;
private readonly SemaphoreSlim _writeLock;
private SQLiteDatabaseConnection? _db;
private bool _disposed;
private bool _disposed = false;
public ManagedConnection(SQLiteDatabaseConnection db, SemaphoreSlim? writeLock)
public ManagedConnection(SQLiteDatabaseConnection db, SemaphoreSlim writeLock)
{
_db = db;
_writeLock = writeLock;
@@ -73,7 +73,7 @@ namespace Emby.Server.Implementations.Data
return;
}
_writeLock?.Release();
_writeLock.Release();
_db = null; // Don't dispose it
_disposed = true;