Skip to content

Commit 4ea42bf

Browse files
committed
Clarify comment.
Signed-off-by: Bradley Grainger <[email protected]>
1 parent ae00599 commit 4ea42bf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/MySqlConnector/MySqlConnection.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,11 @@ internal void Cancel(ICancellableCommand command, int commandId, bool isCancel)
920920

921921
using var connection = CloneWith(csb.ConnectionString);
922922
connection.m_connectionSettings = connectionSettings;
923-
connection.ConnectionOpenedCallback = null; // clear the callback because the user doesn't need to execute any setup logic on this connection
923+
924+
// clear the callback because this is not intended to be a user-visible MySqlConnection that will execute setup logic; it's a
925+
// non-pooled connection that will execute "KILL QUERY" then immediately be closed
926+
connection.ConnectionOpenedCallback = null;
927+
924928
connection.Open();
925929
#if NET6_0_OR_GREATER
926930
var killQuerySql = string.Create(CultureInfo.InvariantCulture, $"KILL QUERY {command.Connection!.ServerThread}");

0 commit comments

Comments
 (0)