diff --git a/Snowflake.Data/Core/Session/SessionPool.cs b/Snowflake.Data/Core/Session/SessionPool.cs index 32715f0cc..0e1fe9468 100644 --- a/Snowflake.Data/Core/Session/SessionPool.cs +++ b/Snowflake.Data/Core/Session/SessionPool.cs @@ -313,7 +313,12 @@ internal Task OpenNewSessionAsync(string connectionString, SecureStri Debug.Assert(previousTask.Exception != null, "previousTask.Exception != null"); throw previousTask.Exception; } - + + if (cancellationToken.IsCancellationRequested) + { + cancellationToken.ThrowIfCancellationRequested(); + } + return session; }, cancellationToken); }