-
Type: Bug
-
Resolution: Won't Do
-
Priority: Minor - P4
-
None
-
Affects Version/s: 3.5.3
-
Component/s: Core
-
Empty show more show less
-
Not Needed
The Node.js driver's support for unref'ing its connections' sockets appears to be incomplete:
const mongodb = require("mongodb");const conn = mongodb.MongoClient.connect(url, {useUnifiedTopology: true}); conn.then(client => { const db = client.db(); db.unref(); // prints "not implemented: `unref`" });
I've tried calling all of the different `unref`s I can find (topology, s, connection, db), but they all end up hitting the not implemented method:
Being able to unref the socket is important for being able to gracefully stop a server.