Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4429

4.8.0 Regression, "MongoClient.close" hangs for 30s when connection errored

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.9.0
    • Affects Version/s: 4.8.0
    • Component/s: None
    • 5
    • Not Needed

      What problem are you facing?

      Since mongodb(nodejs) 4.8.0 running `await connection.close()` after the connection had errored (with `MongoNetworkError: connection 1 to 127.0.0.1:38111 closed`), it hangs for 30 seconds

       

      This problem goes away when reverting to mongodb 4.7.3

      What driver and relevant dependency versions are you using?

      mongodb 4.8.0

      Steps to reproduce?

      • have a running mongodb 5.0.8 (or later patch version) instance
      • connect with a MongoClient connection
      • execute command `await con.db('admin').command({ shutdown: 1, force: true, timeoutSecs: 1 })`
      • try running `await connection.close()`
      • observe it hanging for 30 seconds

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            hasezoey@gmail.com hasezoey N/A
            Neal Beeken
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: