socketTimeoutMS preferences passed to MongoClient options are not used when creating the server object

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.0.16
    • Affects Version/s: 1.4.30
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When creating a MongoClient by passing the socketTimeoutMS option.

      For example when doing this:

        MongoClient.connect(mongoConfig.uri, { server: { socketOptions: { socketTimeoutMS: 1, connectTimeoutMS: 1 } } }, function(err, db) {
      

      only the connectTimeoutMS will make its way through to the final server configuration. This is because in mongo_client.js line 217 the standard value is overwritten with the one from the options array in case it exists. but the same is not happening for the socketTimeoutMS. So this needs to be added here.

      I added a few screenshots showing my debug session in IntelliJ.

            Assignee:
            Christian Amor Kvalheim
            Reporter:
            Max Maurer
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: