From cbfc4d6e14a558ff05d049345fbcc6995be5c213 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Mon, 18 Nov 2024 16:07:37 +0100 Subject: [PATCH] Pass cancellation tokens to ReloadTypesAsync() --- src/EFCore.PG/Migrations/Internal/NpgsqlMigrator.cs | 2 +- src/EFCore.PG/Storage/Internal/NpgsqlDatabaseCreator.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EFCore.PG/Migrations/Internal/NpgsqlMigrator.cs b/src/EFCore.PG/Migrations/Internal/NpgsqlMigrator.cs index 8691f9322..e8a0bea28 100644 --- a/src/EFCore.PG/Migrations/Internal/NpgsqlMigrator.cs +++ b/src/EFCore.PG/Migrations/Internal/NpgsqlMigrator.cs @@ -126,7 +126,7 @@ public override async Task MigrateAsync(string? targetMigration, CancellationTok await _connection.OpenAsync(cancellationToken).ConfigureAwait(false); try { - await npgsqlConnection.ReloadTypesAsync().ConfigureAwait(false); + await npgsqlConnection.ReloadTypesAsync(cancellationToken).ConfigureAwait(false); } catch { diff --git a/src/EFCore.PG/Storage/Internal/NpgsqlDatabaseCreator.cs b/src/EFCore.PG/Storage/Internal/NpgsqlDatabaseCreator.cs index db12255d0..4034f5ef2 100644 --- a/src/EFCore.PG/Storage/Internal/NpgsqlDatabaseCreator.cs +++ b/src/EFCore.PG/Storage/Internal/NpgsqlDatabaseCreator.cs @@ -394,7 +394,7 @@ await Dependencies.MigrationCommandExecutor.ExecuteNonQueryAsync(commands, conne await npgsqlConnection.OpenAsync(cancellationToken).ConfigureAwait(false); try { - await npgsqlConnection.ReloadTypesAsync().ConfigureAwait(false); + await npgsqlConnection.ReloadTypesAsync(cancellationToken).ConfigureAwait(false); } catch {