db-migrate / mongodb

mongodb driver for db-migrate
Other
25 stars 58 forks source link

Driver doesn't close connection #32

Closed raffaele-clevermind closed 6 years ago

raffaele-clevermind commented 6 years ago

the method close for the mondo driver does nothing other then return a successfull promise, which means that the migration process doesn't close the connection

   /**
   * Closes the connection to mongodb
   */
   close: function(callback) {
     return Promise.resolve().nodeify(callback);
   }
wzrdtales commented 6 years ago

No that is wrong. The mongodb driver currently has no active connection it utilizes, but an on demand connection spawned. So closed can't do anything, so this is correct.

See https://github.com/db-migrate/mongodb/blob/1ff05098dc777434b36de3b603f716cf55647c8b/index.js#L270