[CSHARP-397] How do i specify NoTimeout on a MongoCursor? Created: 17/Feb/12  Updated: 05/Apr/19  Resolved: 17/Feb/12

Status: Closed
Project: C# Driver
Component/s: None
Affects Version/s: 1.3.1
Fix Version/s: None

Type: Task Priority: Trivial - P5
Reporter: Yaniv Schiller Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: question
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Is it just
.SetOption("NoTimeout", BsonBoolean.True)

thank you



 Comments   
Comment by Robert Stam [ 17/Feb/12 ]

To set the NoCursorTimeout on the server side use:

cursor.SetFlags(QueryFlags.NoCursorTimeout);

This tells the server not to kill the cursor if it hasn't been used in 10 minutes.

Generated at Wed Feb 07 21:36:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.