mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 14:03:03 +03:00
chore: Add a read only connection for routes like Shows/NextUp
This commit is contained in:
@@ -9,11 +9,12 @@ namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
public sealed class ManagedConnection : IDisposable
|
||||
{
|
||||
private readonly SemaphoreSlim _writeLock;
|
||||
private readonly SemaphoreSlim? _writeLock;
|
||||
|
||||
private SQLiteDatabaseConnection? _db;
|
||||
|
||||
private bool _disposed = false;
|
||||
private bool _disposed;
|
||||
|
||||
|
||||
public ManagedConnection(SQLiteDatabaseConnection db, SemaphoreSlim writeLock)
|
||||
{
|
||||
@@ -73,7 +74,7 @@ namespace Emby.Server.Implementations.Data
|
||||
return;
|
||||
}
|
||||
|
||||
_writeLock.Release();
|
||||
_writeLock?.Release();
|
||||
|
||||
_db = null; // Don't dispose it
|
||||
_disposed = true;
|
||||
|
||||
Reference in New Issue
Block a user