Add a message to unref

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Do
    • Priority: Minor - P4
    • None
    • Affects Version/s: 3.5.3
    • Component/s: Core
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      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:

      https://github.com/mongodb/node-mongodb-native/blob/68170da18f6deb2129cd8f9c706bc7d56f72d537/lib/core/sdam/topology.js#L722-L724

      Being able to unref the socket is important for being able to gracefully stop a server.

              Assignee:
              Daria Pardue
              Reporter:
              Zach Bjornson
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: