Skip to content

Commit

Permalink
SNOW-937188 review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mhofman committed Apr 29, 2024
1 parent e727d1a commit e84b33c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Snowflake.Data/Core/Session/SessionPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,13 @@ internal bool AddSession(SFSession session, bool ensureMinPoolSize)
return false;
}

if (session.SessionPropertiesChanged && _poolConfig.ChangedSession == ChangedSessionBehavior.Destroy)
if (IsMultiplePoolsVersion() &&
session.SessionPropertiesChanged &&
_poolConfig.ChangedSession == ChangedSessionBehavior.Destroy
)
{
session.SetPooling(false);
Task.Run(() => session.CloseAsync(CancellationToken.None)).ConfigureAwait(false);
// Task.Run(() => session.CloseAsync(CancellationToken.None)).ConfigureAwait(false);
ReleaseBusySession(session);
ScheduleNewIdleSessions(ConnectionString, Password, RegisterSessionCreationsWhenReturningSessionToPool());
return false;
Expand Down

0 comments on commit e84b33c

Please sign in to comment.