Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Wraith2 committed Jul 11, 2020
1 parent 9f512cf commit 6150b3b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,19 +189,19 @@ private static void TryGetConnectionCompletedContinuation(Task<DbConnectionInter
CancellationTokenSource source = parameters.Item1;
source.Dispose();

TaskCompletionSource<DbConnectionInternal> retryCompletionSrouce = parameters.Item2;
TaskCompletionSource<DbConnectionInternal> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1980,7 +1980,7 @@ internal Task<T> RegisterForConnectionCloseNotification<T>(Task<T> 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<SqlConnection, object> parameters = (Tuple<SqlConnection, object>)state;
SqlConnection connection = parameters.Item1;
Expand Down

0 comments on commit 6150b3b

Please sign in to comment.