|
In the C# driver the kill cursors command is sent as part of calling Dispose on the old cursor:
https://github.com/mongodb/mongo-csharp-driver/blob/v2.7.x/src/MongoDB.Driver.Core/Core/Operations/ChangeStreamCursor.cs#L94
As per .NET guidelines Dispose methods should NOT throw exceptions, so therefore any errors when calling KillCursors should be ignored.
This can be verified by examining this line of code:
https://github.com/mongodb/mongo-csharp-driver/blob/master/src/MongoDB.Driver.Core/Core/Operations/AsyncCursor.cs#L408
(linking to code from master because this is a change that has not yet shipped).
|