-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Summary
After starting my app with my internet connection disconnected, instancing the 'mongocxx::pool' object with a valid connection string and calling 'mongocxx::Pool::acquire()' or 'mongocxx::Pool::try_acquire()' crash the app due to an error thrown inside of the mongoc drvier with message 'mongoc-client-pool.c:346 mongoc_client_pool_try_pop(): precondition failed: pool'
Environment
mongocxx lib version 3.7.0
OS: Windows 10 Home 64-bit
Compiler: Microsoft (R) C/C++ Optimizing Compiler Version 19.35.32216.1 for x86
How to Reproduce
Disconnect computer from internet
Compile and run the following C++ with MSVC:
auto inst = mongocxx::instance();
std::string connStr = "<valid connection string for mdb here>";
auto pool = std::make_shared<mongocxx::pool>(mongocxx::uri{ connStr });_
auto pl = pool->try_acquire();_
The driver should abort with message 'mongocxx::Pool::try_acquire()' crash the app due to an error thrown inside of the mongoc drvier with message 'mongoc-client-pool.c:346 mongoc_client_pool_try_pop(): precondition failed: pool'