From 788107c70aaf22513afdb0835efe37ee512ca868 Mon Sep 17 00:00:00 2001 From: Bradley Grainger Date: Sat, 31 Aug 2024 08:42:02 -0700 Subject: [PATCH] Provide logger to new MySqlConnection. Fixes #1510 Signed-off-by: Bradley Grainger --- src/MySqlConnector/MySqlConnection.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/MySqlConnector/MySqlConnection.cs b/src/MySqlConnector/MySqlConnection.cs index 4e3663e66..2d1b30531 100644 --- a/src/MySqlConnector/MySqlConnection.cs +++ b/src/MySqlConnector/MySqlConnection.cs @@ -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);