aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Activity/ActivityRepository.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-25 01:58:38 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-11-25 01:58:38 -0500
commita9645e14298dfeb799b86bf9e3cde097af02cfd3 (patch)
tree27e5a07a9bac19acc82b9eff0b609d552150c4a2 /Emby.Server.Implementations/Activity/ActivityRepository.cs
parent9606a2a710614404b4dda96cceff688314a1ec89 (diff)
update components
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>();