Backport pull request #11969 from jellyfin/release-10.9.z

Create readonly DB connections when possible

Original-merge: a46c17e19f

Merged-by: joshuaboniface <joshua@boniface.me>

Backported-by: Joshua M. Boniface <joshua@boniface.me>
This commit is contained in:
Bond-009
2024-06-06 14:30:36 -04:00
committed by Joshua M. Boniface
parent cd5fb84136
commit 78e8eae5ad
3 changed files with 17 additions and 17 deletions

View File

@@ -267,7 +267,7 @@ namespace Emby.Server.Implementations.Data
ArgumentException.ThrowIfNullOrEmpty(key);
using (var connection = GetConnection())
using (var connection = GetConnection(true))
{
using (var statement = connection.PrepareStatement("select key,userid,rating,played,playCount,isFavorite,playbackPositionTicks,lastPlayedDate,AudioStreamIndex,SubtitleStreamIndex from UserDatas where key =@Key and userId=@UserId"))
{