diff options
Diffstat (limited to 'Emby.Server.Implementations/Social/SharingRepository.cs')
| -rw-r--r-- | Emby.Server.Implementations/Social/SharingRepository.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Emby.Server.Implementations/Social/SharingRepository.cs b/Emby.Server.Implementations/Social/SharingRepository.cs index 12d846e81..e8230947e 100644 --- a/Emby.Server.Implementations/Social/SharingRepository.cs +++ b/Emby.Server.Implementations/Social/SharingRepository.cs @@ -52,9 +52,9 @@ namespace Emby.Server.Implementations.Social throw new ArgumentNullException("info.Id"); } - using (var connection = CreateConnection()) + using (WriteLock.Write()) { - using (WriteLock.Write()) + using (var connection = CreateConnection()) { connection.RunInTransaction(db => { @@ -77,9 +77,9 @@ namespace Emby.Server.Implementations.Social throw new ArgumentNullException("id"); } - using (var connection = CreateConnection(true)) + using (WriteLock.Read()) { - using (WriteLock.Read()) + using (var connection = CreateConnection(true)) { var commandText = "select Id, ItemId, UserId, ExpirationDate from Shares where id = ?"; |
