lib/ConnectionPool.js
function (obj) {
            var self = this;
            this.validate(obj).chain(function (valid) {
                var index;
                if (self.count <= self.__maxObjects && valid && (index = self.__inUseObjects.indexOf(obj)) > -1) {
                    self.__inUseObjects.splice(index, 1);
                    self.__freeObjects.enqueue(obj);
                    self.__checkQueries();
                } else {
                    self.removeObject(obj);
                }
            });
        }
function (obj) {
            var self = this;
            this.validate(obj).chain(function (valid) {
                var index;
                if (self.count <= self.__maxObjects && valid && (index = self.__inUseObjects.indexOf(obj)) > -1) {
                    self.__inUseObjects.splice(index, 1);
                    self.__freeObjects.enqueue(obj);
                    self.__checkQueries();
                } else {
                    self.removeObject(obj);
                }
            });
        }
function ( obj ) { var self = this ; this . validate ( obj ) . chain ( function ( valid ) { var index ; if ( self . count <= self . __maxObjects && valid && ( index = self . __inUseObjects . indexOf ( obj ) ) > - 1 ) { self . __inUseObjects . splice ( index , 1 ) ; self . __freeObjects . enqueue ( obj ) ; self . __checkQueries ( ) ; } else { self . removeObject ( obj ) ; } } ) ; }
Override comb.collections.Pool to allow async validation to allow
pools to do any calls to reset a connection if it needs to be done.

@param {*} connection the connection to return.
Override comb . collections . Pool to allow async validation to allow pools to do any calls to reset a connection if it needs to be done .