From 6150b3bb3d1b8e5d16738b11cdba4d15a4aaec1a Mon Sep 17 00:00:00 2001 From: Wraith2 Date: Sat, 11 Jul 2020 18:35:11 +0100 Subject: [PATCH] address feedback --- .../Microsoft/Data/ProviderBase/DbConnectionFactory.cs | 8 ++++---- .../netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/ProviderBase/DbConnectionFactory.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/ProviderBase/DbConnectionFactory.cs index faf87c9f53..eed3ff6970 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/ProviderBase/DbConnectionFactory.cs +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/ProviderBase/DbConnectionFactory.cs @@ -189,19 +189,19 @@ private static void TryGetConnectionCompletedContinuation(Task retryCompletionSrouce = parameters.Item2; + TaskCompletionSource retryCompletionSource = parameters.Item2; if (task.IsCanceled) { - retryCompletionSrouce.TrySetException(ADP.ExceptionWithStackTrace(ADP.NonPooledOpenTimeout())); + retryCompletionSource.TrySetException(ADP.ExceptionWithStackTrace(ADP.NonPooledOpenTimeout())); } else if (task.IsFaulted) { - retryCompletionSrouce.TrySetException(task.Exception.InnerException); + retryCompletionSource.TrySetException(task.Exception.InnerException); } else { - if (!retryCompletionSrouce.TrySetResult(task.Result)) + if (!retryCompletionSource.TrySetResult(task.Result)) { // The outer TaskCompletionSource was already completed // Which means that we don't know if someone has messed with the outer connection in the middle of creation diff --git a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs index 7d1182b5c5..f53e7cebdb 100644 --- a/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs +++ b/src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlConnection.cs @@ -1980,7 +1980,7 @@ internal Task RegisterForConnectionCloseNotification(Task outerTask, ob { // Connection exists, schedule removal, will be added to ref collection after calling ValidateAndReconnect return outerTask.ContinueWith( - continuationFunction: (task,state) => + continuationFunction: (task, state) => { Tuple parameters = (Tuple)state; SqlConnection connection = parameters.Item1;