Skip to content

Commit 2a3996a

Browse files
committed
rebase and address feedback
1 parent a42eed3 commit 2a3996a

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/AAsyncCallContext.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ protected override void DisposeCore()
4242
{
4343
TDisposable copyDisposable = _disposable;
4444
_disposable = default;
45-
_isDisposed = true;
4645
copyDisposable?.Dispose();
4746
}
4847
}

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDataReader.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4734,7 +4734,7 @@ public override Task<bool> ReadAsync(CancellationToken cancellationToken)
47344734
}
47354735

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

4841-
CancellationTokenRegistration registration = default;
4842-
if (cancellationToken.CanBeCanceled)
4843-
{
4844-
registration = cancellationToken.Register(SqlCommand.s_cancelIgnoreFailure, _command);
4845-
}
4846-
48474841
ReadAsyncCallContext context = null;
48484842
if (_connection?.InnerConnection is SqlInternalConnection sqlInternalConnection)
48494843
{

0 commit comments

Comments
 (0)