aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Security/AuthenticationRepository.cs
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2016-11-19 13:10:03 -0500
committerGitHub <noreply@github.com>2016-11-19 13:10:03 -0500
commit2877da48835cf0127bf505ed6121d29309198f31 (patch)
tree7d5f4ce7db93a914f2cc8c2247a760a163a1dd20 /Emby.Server.Implementations/Security/AuthenticationRepository.cs
parent3fd52ff735a441a003a25c6f7abef91880d77b2c (diff)
parent5209ce9b2f7d2c56bca2c65966a5e2e7cc982133 (diff)
Merge pull request #2295 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Security/AuthenticationRepository.cs')
-rw-r--r--Emby.Server.Implementations/Security/AuthenticationRepository.cs8
1 files changed, 5 insertions, 3 deletions
diff --git a/Emby.Server.Implementations/Security/AuthenticationRepository.cs b/Emby.Server.Implementations/Security/AuthenticationRepository.cs
index 5179bd258..f6163b80a 100644
--- a/Emby.Server.Implementations/Security/AuthenticationRepository.cs
+++ b/Emby.Server.Implementations/Security/AuthenticationRepository.cs
@@ -40,7 +40,9 @@ namespace Emby.Server.Implementations.Security
connection.RunInTransaction(db =>
{
- AddColumn(db, "AccessTokens", "AppVersion", "TEXT");
+ var existingColumnNames = GetColumnNames(db, "AccessTokens");
+
+ AddColumn(db, "AccessTokens", "AppVersion", "TEXT", existingColumnNames);
});
}
}
@@ -61,7 +63,7 @@ namespace Emby.Server.Implementations.Security
cancellationToken.ThrowIfCancellationRequested();
- lock (WriteLock)
+ using (WriteLock.Write())
{
using (var connection = CreateConnection())
{
@@ -193,7 +195,7 @@ namespace Emby.Server.Implementations.Security
throw new ArgumentNullException("id");
}
- lock (WriteLock)
+ using (WriteLock.Read())
{
using (var connection = CreateConnection(true))
{