예제 #1
0
 private void DisposeConnection()
 {
     try
     {
         lock (_disposeLock)
         {
             using (WriteLock.Write())
             {
                 _connection?.Dispose();
                 _dbConnection?.Dispose();
             }
         }
     }
     catch (Exception ex)
     {
         _logger.LogError(ex, "Error disposing database", ex);
     }
 }
예제 #2
0
        private void DisposeConnection()
        {
            try
            {
                lock (_disposeLock)
                {
                    using (WriteLock.Write())
                    {
                        _connection?.Dispose();
#if JELLYFIN
                        _dbConnection?.Dispose();
#endif
                    }
                }
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, $"Error disposing database: {ex}");
            }
        }