You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Snowflake.Data/Client/SnowflakeDbConnection.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -322,6 +322,7 @@ public override Task OpenAsync(CancellationToken cancellationToken)
322
322
{
323
323
_connectionState=ConnectionState.Closed;
324
324
logger.Debug("Connection canceled");
325
+
thrownewTaskCanceledException("Connecting was cancelled");
325
326
}
326
327
else
327
328
{
@@ -330,8 +331,7 @@ public override Task OpenAsync(CancellationToken cancellationToken)
330
331
logger.Debug($"Connection open with pooled session: {SfSession.sessionId}");
331
332
OnSessionEstablished();
332
333
}
333
-
},
334
-
cancellationToken);
334
+
},TaskContinuationOptions.None);// this continuation should be executed always (even if the whole operation was canceled) because it sets the proper state of the connection
0 commit comments