Skip to content

Commit 788107c

Browse files
committed
Provide logger to new MySqlConnection. Fixes #1510
Signed-off-by: Bradley Grainger <[email protected]>
1 parent ed0fad8 commit 788107c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/MySqlConnector/MySqlConnection.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,12 +1178,10 @@ private async Task DoCloseAsync(bool changeState, IOBehavior ioBehavior)
11781178
// This connection is being closed, so create a new MySqlConnection that will own the ServerSession
11791179
// (which remains open). This ensures the ServerSession always has a valid OwningConnection (even
11801180
// if 'this' is GCed.
1181-
var connection = new MySqlConnection
1181+
var connection = new MySqlConnection(this, m_dataSource, m_connectionString, hasBeenOpened: true)
11821182
{
1183-
m_connectionString = m_connectionString,
11841183
m_connectionSettings = m_connectionSettings,
11851184
m_connectionState = m_connectionState,
1186-
m_hasBeenOpened = true,
11871185
};
11881186
connection.TakeSessionFrom(this);
11891187

0 commit comments

Comments
 (0)