Skip to content

Commit

Permalink
rebase and address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Wraith2 committed Oct 4, 2022
1 parent a42eed3 commit 2a3996a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ protected override void DisposeCore()
{
TDisposable copyDisposable = _disposable;
_disposable = default;
_isDisposed = true;
copyDisposable?.Dispose();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4734,7 +4734,7 @@ public override Task<bool> ReadAsync(CancellationToken cancellationToken)
}

// Register first to catch any already expired tokens to be able to trigger cancellation event.
IDisposable registration = null;
CancellationTokenRegistration registration = default;
if (cancellationToken.CanBeCanceled)
{
registration = cancellationToken.Register(SqlCommand.s_cancelIgnoreFailure, _command);
Expand Down Expand Up @@ -4838,12 +4838,6 @@ public override Task<bool> ReadAsync(CancellationToken cancellationToken)
return source.Task;
}

CancellationTokenRegistration registration = default;
if (cancellationToken.CanBeCanceled)
{
registration = cancellationToken.Register(SqlCommand.s_cancelIgnoreFailure, _command);
}

ReadAsyncCallContext context = null;
if (_connection?.InnerConnection is SqlInternalConnection sqlInternalConnection)
{
Expand Down

0 comments on commit 2a3996a

Please sign in to comment.