title: Is it useful to close a MongoDB connection in NodeJS when Ctrl + C is used?
body: <p>I'm working on a NodeJS script using MongoDB.</p>
  
  <p>Without going into too much details, the script take intentionally a long time to be executed and most of the time I finish it using <kbd>CTRL</kbd> + <kbd>C</kbd>.</p>
  
  <p>I write a bit of code to properly close the connection when I do this.</p>
  
  <p>But I have no idea if it's useful or definitely useless to do it...</p>
  
  <p>Here is my code:</p>
  
  <pre><code>MongoClient.connect(url, function (err, db) {
      console.log('Connected correctly to server');
  
      /* Magic happens here */
  
      process.on('SIGINT', function () { //Should I do this ?
          console.log('Bye');
          db.close();
          process.exit();
      })
  });
  </code></pre>
  
  <p>Should I use <code>process.on('SIGINT', fct)</code> or just leave node do his job?</p>