aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Security/AuthenticationRepository.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Server.Implementations/Security/AuthenticationRepository.cs')
-rw-r--r--Emby.Server.Implementations/Security/AuthenticationRepository.cs17
1 files changed, 9 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/Security/AuthenticationRepository.cs b/Emby.Server.Implementations/Security/AuthenticationRepository.cs
index abc23239e..dfcd6af0d 100644
--- a/Emby.Server.Implementations/Security/AuthenticationRepository.cs
+++ b/Emby.Server.Implementations/Security/AuthenticationRepository.cs
@@ -23,7 +23,8 @@ namespace Emby.Server.Implementations.Security
public void Initialize()
{
- using (var connection = CreateConnection())
+ CreateConnections().GetAwaiter().GetResult();
+ using (var connection = GetConnection())
{
RunDefaultInitialization(connection);
@@ -48,7 +49,7 @@ namespace Emby.Server.Implementations.Security
}
}
- private void TryMigrate(SQLiteDatabaseConnection connection, bool tableNewlyCreated)
+ private void TryMigrate(ManagedConnection connection, bool tableNewlyCreated)
{
try
{
@@ -87,7 +88,7 @@ namespace Emby.Server.Implementations.Security
throw new ArgumentNullException(nameof(info));
}
- using (var connection = CreateConnection())
+ using (var connection = GetConnection())
{
connection.RunInTransaction(db =>
{
@@ -119,7 +120,7 @@ namespace Emby.Server.Implementations.Security
throw new ArgumentNullException(nameof(info));
}
- using (var connection = CreateConnection())
+ using (var connection = GetConnection())
{
connection.RunInTransaction(db =>
{
@@ -151,7 +152,7 @@ namespace Emby.Server.Implementations.Security
throw new ArgumentNullException(nameof(info));
}
- using (var connection = CreateConnection())
+ using (var connection = GetConnection())
{
connection.RunInTransaction(db =>
{
@@ -248,7 +249,7 @@ namespace Emby.Server.Implementations.Security
var list = new List<AuthenticationInfo>();
- using (var connection = CreateConnection(true))
+ using (var connection = GetConnection(true))
{
return connection.RunInTransaction(db =>
{
@@ -346,7 +347,7 @@ namespace Emby.Server.Implementations.Security
public DeviceOptions GetDeviceOptions(string deviceId)
{
- using (var connection = CreateConnection(true))
+ using (var connection = GetConnection(true))
{
return connection.RunInTransaction(db =>
{
@@ -378,7 +379,7 @@ namespace Emby.Server.Implementations.Security
throw new ArgumentNullException(nameof(options));
}
- using (var connection = CreateConnection())
+ using (var connection = GetConnection())
{
connection.RunInTransaction(db =>
{