Skip to content

Commit

Permalink
Provide logger to new MySqlConnection. Fixes #1510
Browse files Browse the repository at this point in the history
Signed-off-by: Bradley Grainger <[email protected]>
  • Loading branch information
bgrainger committed Aug 31, 2024
1 parent ed0fad8 commit 788107c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/MySqlConnector/MySqlConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1178,12 +1178,10 @@ private async Task DoCloseAsync(bool changeState, IOBehavior ioBehavior)
// This connection is being closed, so create a new MySqlConnection that will own the ServerSession
// (which remains open). This ensures the ServerSession always has a valid OwningConnection (even
// if 'this' is GCed.
var connection = new MySqlConnection
var connection = new MySqlConnection(this, m_dataSource, m_connectionString, hasBeenOpened: true)
{
m_connectionString = m_connectionString,
m_connectionSettings = m_connectionSettings,
m_connectionState = m_connectionState,
m_hasBeenOpened = true,
};
connection.TakeSessionFrom(this);

Expand Down

0 comments on commit 788107c

Please sign in to comment.