aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Activity/ActivityRepository.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-11-25 13:25:43 -0500
committerGitHub <noreply@github.com>2016-11-25 13:25:43 -0500
commit43da530b273051c4e3475ee31947cdbd14787616 (patch)
treeccb0c470125108de3d65ee8c4458e104169ef01c /Emby.Server.Implementations/Activity/ActivityRepository.cs
parent80f7959f49ce1bb49c3911ff7a2cf77bbcca368c (diff)
parentd54c11fb747e3cf0369ddade42c93d7e795f5a4f (diff)
Merge pull request #2308 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Activity/ActivityRepository.cs')
-rw-r--r--Emby.Server.Implementations/Activity/ActivityRepository.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Activity/ActivityRepository.cs b/Emby.Server.Implementations/Activity/ActivityRepository.cs
index eef9792de..ba81992ac 100644
--- a/Emby.Server.Implementations/Activity/ActivityRepository.cs
+++ b/Emby.Server.Implementations/Activity/ActivityRepository.cs
@@ -58,9 +58,9 @@ namespace Emby.Server.Implementations.Activity
throw new ArgumentNullException("entry");
}
- using (var connection = CreateConnection())
+ using (WriteLock.Write())
{
- using (WriteLock.Write())
+ using (var connection = CreateConnection())
{
connection.RunInTransaction(db =>
{
@@ -86,9 +86,9 @@ namespace Emby.Server.Implementations.Activity
public QueryResult<ActivityLogEntry> GetActivityLogEntries(DateTime? minDate, int? startIndex, int? limit)
{
- using (var connection = CreateConnection(true))
+ using (WriteLock.Read())
{
- using (WriteLock.Read())
+ using (var connection = CreateConnection(true))
{
var commandText = BaseActivitySelectText;
var whereClauses = new List<string>();