[CSHARP-116] If Flush is called just before Close on a BsonBinaryWriter then Close throws an ArgumentOutOfRangeException Created: 29/Nov/10  Updated: 02/Apr/15  Resolved: 01/Dec/10

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

Type: Bug Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Code snippet to reproduce:

var stream = new MemoryStream();
using (var bsonWriter = BsonWriter.Create(stream))

{ bsonWriter.WriteStartDocument(); bsonWriter.WriteEndDocument(); bsonWriter.Flush(); bsonWriter.Close(); }

 Comments   
Comment by Robert Stam [ 01/Dec/10 ]

Fixed. Flush can be called any time now.

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