diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-12-11 01:47:54 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-11 01:47:54 -0500 |
| commit | 446b2e29d086a44548b585ea9c66d0ab4c1675eb (patch) | |
| tree | 4a594ff21204a6cd4df05d3550f869d47eaa8a77 /Emby.Server.Implementations/Security | |
| parent | 56ba0c5b5d0ecc6b3dc695af8efeb12465ac44d3 (diff) | |
| parent | a8d9a3440d0143aa7cf564f21aff2eadc4b88e6a (diff) | |
Merge pull request #2336 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Server.Implementations/Security')
| -rw-r--r-- | Emby.Server.Implementations/Security/AuthenticationRepository.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Emby.Server.Implementations/Security/AuthenticationRepository.cs b/Emby.Server.Implementations/Security/AuthenticationRepository.cs index dbda4a460..dbca4931b 100644 --- a/Emby.Server.Implementations/Security/AuthenticationRepository.cs +++ b/Emby.Server.Implementations/Security/AuthenticationRepository.cs @@ -66,9 +66,9 @@ namespace Emby.Server.Implementations.Security cancellationToken.ThrowIfCancellationRequested(); - using (var connection = CreateConnection()) + using (WriteLock.Write()) { - using (WriteLock.Write()) + using (var connection = CreateConnection()) { connection.RunInTransaction(db => { @@ -202,9 +202,9 @@ namespace Emby.Server.Implementations.Security var list = new List<AuthenticationInfo>(); - using (var connection = CreateConnection(true)) + using (WriteLock.Read()) { - using (WriteLock.Read()) + using (var connection = CreateConnection(true)) { using (var statement = connection.PrepareStatement(commandText)) { @@ -241,9 +241,9 @@ namespace Emby.Server.Implementations.Security throw new ArgumentNullException("id"); } - using (var connection = CreateConnection(true)) + using (WriteLock.Read()) { - using (WriteLock.Read()) + using (var connection = CreateConnection(true)) { var commandText = BaseSelectText + " where Id=@Id"; |
