Skip to content

Commit

Permalink
fix timeout units
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-knozderko committed Jan 2, 2024
1 parent 99799bc commit f5c1c23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Snowflake.Data/Core/Session/SessionPool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private SFSession WaitForSession(string connStr)
{
var timeout = _waitingQueue.GetWaitingTimeoutMillis();
s_logger.Warn($"SessionPool::WaitForSession for {timeout} millis timeout");
var beforeWaitingTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
var beforeWaitingTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
string debugApplicationName = "";
if (connStr.EndsWith("application=TestWaitForMaxSize1"))
debugApplicationName = "TestWaitForMaxSize1";
Expand Down Expand Up @@ -201,7 +201,7 @@ private SFSession WaitForSession(string connStr)
{
s_logger.Warn($"SessionPool::WaitForSession - woken without a session granted for: {debugApplicationName}");
}
nowTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
nowTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
}
s_logger.Warn($"SessionPool::WaitForSession - could not find any idle session available withing a given timeout for: {debugApplicationName} at: {nowTime}");
throw WaitingFailedException();
Expand Down

0 comments on commit f5c1c23

Please sign in to comment.