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

when using RequestStart(), ReleaseConnection tries to return in-use connection back to the pool

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.9
    • Affects Version/s: 0.9
    • Component/s: None
    • Labels:
      None

      when using RequestStart(), ReleaseConnection tries to return in-use connection back to the pool resulting in NullReferenceException as Connection has been closed as the pool reaches maximum size. To reproduce, do something like

      var db = server.GetDatabase("test");
      var collection = db.GetCollection("test");
      collection.RemoveAll();
      using (var x = db.RequestStart())
      {
      for( int i=0; i<1000; i++ )
      {
      collection.Insert(new BsonDocument {

      {"blah",i}

      }, SafeMode.True);
      }
      }

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            testn Testo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: