aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Data/ManagedConnection.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2022-03-06 11:04:36 -0700
committerGitHub <noreply@github.com>2022-03-06 11:04:36 -0700
commit1dcd537ea2aba06a63bd64be692e44860f5e052f (patch)
tree0dffcdf0893a094273f9e993c03ff36c275a8007 /Emby.Server.Implementations/Data/ManagedConnection.cs
parent973781c4824c7e703607d10ff92928634ba68916 (diff)
parent0a8bec1af44665509510022c491b6ee9b8179fe1 (diff)
Merge pull request #7411 from jellyfin/revert-7240-add-readonly-connection
Diffstat (limited to 'Emby.Server.Implementations/Data/ManagedConnection.cs')
-rw-r--r--Emby.Server.Implementations/Data/ManagedConnection.cs8
1 files changed, 4 insertions, 4 deletions
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;