-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Minor - P4
-
None
-
Affects Version/s: 3.3.3
-
Component/s: Native
-
Environment:node v10.16.3
-
Empty show more show less
Code snippet:
const { MongoClient } = require('mongodb'); (async () => { const client = await new MongoClient('mongodb://localhost:27017', { useUnifiedTopology: true }); await client.connect(); await client.close(); console.log('First connection worked fine.'); await client.connect(); await client.close(); console.log('Second connection created errors.'); })();
Issue occurs even though close() was called inbetween to close the connection.
Output:
First connection worked fine. the options [servers] is not supported the options [caseTranslate] is not supported the options [dbName] is not supported Second connection created errors.Process finished with exit code 0