close database connection after calling callback

Viewed 37

Just not sure about the flow of this code

doStuff()
  .then(() => { callback(); })
  .catch(err => callback(err))
  .then(db.close);

Would db.close get called in this scenario?

1 Answers
Related