@@ -220,7 +220,7 @@ private CursorBatch<TDocument> ExecuteGetMoreCommand(IChannelHandle channel, Can
220
220
try
221
221
{
222
222
// TODO: CSOT: Implement operation context support for Cursors
223
- var operationContext = new OperationContext ( Timeout . InfiniteTimeSpan , cancellationToken ) ;
223
+ var operationContext = new OperationContext ( null , cancellationToken ) ;
224
224
result = channel . Command < BsonDocument > (
225
225
operationContext ,
226
226
_channelSource . Session ,
@@ -250,7 +250,7 @@ private async Task<CursorBatch<TDocument>> ExecuteGetMoreCommandAsync(IChannelHa
250
250
try
251
251
{
252
252
// TODO: CSOT: Implement operation context support for Cursors
253
- var operationContext = new OperationContext ( Timeout . InfiniteTimeSpan , cancellationToken ) ;
253
+ var operationContext = new OperationContext ( null , cancellationToken ) ;
254
254
result = await channel . CommandAsync < BsonDocument > (
255
255
operationContext ,
256
256
_channelSource . Session ,
@@ -276,7 +276,7 @@ private async Task<CursorBatch<TDocument>> ExecuteGetMoreCommandAsync(IChannelHa
276
276
private void ExecuteKillCursorsCommand ( IChannelHandle channel , CancellationToken cancellationToken )
277
277
{
278
278
// TODO: CSOT: Implement operation context support for Cursors
279
- var operationContext = new OperationContext ( Timeout . InfiniteTimeSpan , cancellationToken ) ;
279
+ var operationContext = new OperationContext ( null , cancellationToken ) ;
280
280
var command = CreateKillCursorsCommand ( ) ;
281
281
var result = channel . Command (
282
282
operationContext ,
@@ -298,7 +298,7 @@ private void ExecuteKillCursorsCommand(IChannelHandle channel, CancellationToken
298
298
private async Task ExecuteKillCursorsCommandAsync ( IChannelHandle channel , CancellationToken cancellationToken )
299
299
{
300
300
// TODO: CSOT: Implement operation context support for Cursors
301
- var operationContext = new OperationContext ( Timeout . InfiniteTimeSpan , cancellationToken ) ;
301
+ var operationContext = new OperationContext ( null , cancellationToken ) ;
302
302
var command = CreateKillCursorsCommand ( ) ;
303
303
var result = await channel . CommandAsync (
304
304
operationContext ,
@@ -418,7 +418,7 @@ private void DisposeChannelSourceIfNoLongerNeeded()
418
418
private CursorBatch < TDocument > GetNextBatch ( CancellationToken cancellationToken )
419
419
{
420
420
// TODO: CSOT implement proper way to obtain the operationContext
421
- var operationContext = new OperationContext ( Timeout . InfiniteTimeSpan , cancellationToken ) ;
421
+ var operationContext = new OperationContext ( null , cancellationToken ) ;
422
422
using ( EventContext . BeginOperation ( _operationId ) )
423
423
using ( var channel = _channelSource . GetChannel ( operationContext ) )
424
424
{
@@ -429,7 +429,7 @@ private CursorBatch<TDocument> GetNextBatch(CancellationToken cancellationToken)
429
429
private async Task < CursorBatch < TDocument > > GetNextBatchAsync ( CancellationToken cancellationToken )
430
430
{
431
431
// TODO: CSOT implement proper way to obtain the operationContext
432
- var operationContext = new OperationContext ( Timeout . InfiniteTimeSpan , cancellationToken ) ;
432
+ var operationContext = new OperationContext ( null , cancellationToken ) ;
433
433
using ( EventContext . BeginOperation ( _operationId ) )
434
434
using ( var channel = await _channelSource . GetChannelAsync ( operationContext ) . ConfigureAwait ( false ) )
435
435
{
@@ -445,7 +445,7 @@ private bool IsMongoCursorNotFoundException(MongoCommandException exception)
445
445
private void KillCursors ( CancellationToken cancellationToken )
446
446
{
447
447
// TODO: CSOT implement proper way to obtain the operationContext
448
- var operationContext = new OperationContext ( Timeout . InfiniteTimeSpan , cancellationToken ) ;
448
+ var operationContext = new OperationContext ( null , cancellationToken ) ;
449
449
using ( EventContext . BeginOperation ( _operationId ) )
450
450
using ( EventContext . BeginKillCursors ( _collectionNamespace ) )
451
451
using ( var channel = _channelSource . GetChannel ( operationContext . WithTimeout ( TimeSpan . FromSeconds ( 10 ) ) ) )
@@ -460,7 +460,7 @@ private void KillCursors(CancellationToken cancellationToken)
460
460
private async Task KillCursorsAsync ( CancellationToken cancellationToken )
461
461
{
462
462
// TODO: CSOT implement proper way to obtain the operationContext
463
- var operationContext = new OperationContext ( Timeout . InfiniteTimeSpan , cancellationToken ) ;
463
+ var operationContext = new OperationContext ( null , cancellationToken ) ;
464
464
using ( EventContext . BeginOperation ( _operationId ) )
465
465
using ( EventContext . BeginKillCursors ( _collectionNamespace ) )
466
466
using ( var channel = await _channelSource . GetChannelAsync ( operationContext . WithTimeout ( TimeSpan . FromSeconds ( 10 ) ) ) . ConfigureAwait ( false ) )
0 commit comments