Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
None
-
None
-
None
Description
The problem is that after getting stream from mongoc_gridfs_file_t, it's impossible to destroy only stream, since during stream destruction gridfs_file is also destroyed. So it's causes at least to problems.
1. In order to destroy gridfs_file you should know if stream was already opened and call mongoc_stream_destroy otherwise call mongoc_gridfs_file_destroy.
2. It's impossible to reuse gridfs_file, because it's destroyed with stream.