Skip to content

Commit 70d8361

Browse files
committed
fix(Spanner): Really check for null settings on BatchWrite
1 parent e0c4160 commit 70d8361

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apis/Google.Cloud.Spanner.V1/Google.Cloud.Spanner.V1/ManagedSession.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public async Task<ManagedTransaction> BeginTransactionAsync(TransactionOptions t
6262
public async Task<AsyncResponseStream<BatchWriteResponse>> BatchWriteAsync(BatchWriteRequest request, CallSettings callSettings)
6363
{
6464
GaxPreconditions.CheckNotNull(request, nameof(request));
65-
CancellationToken cancellationToken = callSettings.CancellationToken ?? default;
65+
CancellationToken cancellationToken = callSettings?.CancellationToken ?? default;
6666
var session = await _lifecycleManager.GetFreshSessionAsync(cancellationToken).ConfigureAwait(false);
6767

6868
// Populate the request with the current session name.

0 commit comments

Comments
 (0)