Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-1934

Set TImeOut for RunCommand

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Blocker - P1
    • Resolution: Works as Designed
    • Affects Version/s: 2.4.2
    • Fix Version/s: None
    • Component/s: API, Documentation
    • Labels:
    • Environment:
      OS : Windows 7
      .Net : 4.6.1

      Description

      Is there any way to reduce the default command timeout of 30000ms of RunCommand in below code?

      var command = new BsonDocument { { "dbstats", 1 } };
       
      var stats = database.RunCommand<BsonDocument>(command);
       
      Console.WriteLine(stats.ToJson()); // do something with the stats
      

      Thanks in advance.
      Irshad.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: