lib/adapter.js
function(conn, cb) {
      log.debug('teardown:', conn);
      /* istanbul ignore if: standard waterline-adapter code */
      if ( typeof conn == 'function') {
        cb = conn;
        conn = null;
      }
      /* istanbul ignore if: standard waterline-adapter code */
      if (!conn) {
        connections = {};
        return cb();
      }
      /* istanbul ignore if: standard waterline-adapter code */
      if (!connections[conn])
        return cb();
      delete connections[conn];
      cb();
    }
function(conn, cb) {
      log.debug('teardown:', conn);
      /* istanbul ignore if: standard waterline-adapter code */
      if ( typeof conn == 'function') {
        cb = conn;
        conn = null;
      }
      /* istanbul ignore if: standard waterline-adapter code */
      if (!conn) {
        connections = {};
        return cb();
      }
      /* istanbul ignore if: standard waterline-adapter code */
      if (!connections[conn])
        return cb();
      delete connections[conn];
      cb();
    }
function ( conn , cb ) { log . debug ( 'teardown:' , conn ) ; /* istanbul ignore if: standard waterline-adapter code */ if ( typeof conn == 'function' ) { cb = conn ; conn = null ; } /* istanbul ignore if: standard waterline-adapter code */ if ( ! conn ) { connections = { } ; return cb ( ) ; } /* istanbul ignore if: standard waterline-adapter code */ if ( ! connections [ conn ] ) return cb ( ) ; delete connections [ conn ] ; cb ( ) ; }
Teardown a Connection

Fired when a model is unregistered, typically when the server is
killed. Useful for tearing-down remaining open connections, etc.

@param {Function} cb [description]
@return {[type]} [description]
Teardown a Connection