From 0a8bec1af44665509510022c491b6ee9b8179fe1 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Sun, 6 Mar 2022 09:30:47 -0700 Subject: Revert "chore: Add a read only connection for routes like Shows/NextUp" --- Emby.Server.Implementations/Data/ManagedConnection.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Emby.Server.Implementations/Data/ManagedConnection.cs') diff --git a/Emby.Server.Implementations/Data/ManagedConnection.cs b/Emby.Server.Implementations/Data/ManagedConnection.cs index fe09bdc2a..11e33278d 100644 --- a/Emby.Server.Implementations/Data/ManagedConnection.cs +++ b/Emby.Server.Implementations/Data/ManagedConnection.cs @@ -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; -- cgit v1.2.3