Skip to content

Commit 71e680a

Browse files
committed
Revert word-wrapping.
Signed-off-by: Bradley Grainger <[email protected]>
1 parent 003934c commit 71e680a

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/MySqlConnector/Core/ConnectionPool.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,8 @@ public async ValueTask<ServerSession> GetSessionAsync(MySqlConnection connection
7474
if (ConnectionSettings.ConnectionReset || session.DatabaseOverride is not null)
7575
{
7676
if (timeoutMilliseconds != 0)
77-
session.SetTimeout(Math.Max(1,
78-
timeoutMilliseconds - Utility.GetElapsedMilliseconds(startingTimestamp)));
79-
reuseSession = await session
80-
.TryResetConnectionAsync(ConnectionSettings, connection, ioBehavior, cancellationToken)
81-
.ConfigureAwait(false);
77+
session.SetTimeout(Math.Max(1, timeoutMilliseconds - Utility.GetElapsedMilliseconds(startingTimestamp)));
78+
reuseSession = await session.TryResetConnectionAsync(ConnectionSettings, connection, ioBehavior, cancellationToken).ConfigureAwait(false);
8279
session.SetTimeout(Constants.InfiniteTimeout);
8380
}
8481
else
@@ -110,8 +107,7 @@ public async ValueTask<ServerSession> GetSessionAsync(MySqlConnection connection
110107
Log.ReturningPooledSession(m_logger, Id, session.Id, leasedSessionsCountPooled);
111108

112109
session.LastLeasedTimestamp = Stopwatch.GetTimestamp();
113-
MetricsReporter.RecordWaitTime(this,
114-
Utility.GetElapsedSeconds(startingTimestamp, session.LastLeasedTimestamp));
110+
MetricsReporter.RecordWaitTime(this, Utility.GetElapsedSeconds(startingTimestamp, session.LastLeasedTimestamp));
115111
return session;
116112
}
117113
}

tests/MySqlConnector.Tests/UtilityTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace MySqlConnector.Tests;
77

88
public class UtilityTests
99
{
10-
1110
[Theory]
1211
[InlineData("mariadb://host.example.com:1234/?user=user@host", "host.example.com", 1234, "user@host")]
1312
[InlineData("mariadb://user%40host:[email protected]:1234/", "host.example.com", 1234, "user@host")]

0 commit comments

Comments
 (0)