sequelize / sequelize-pool

Resource pool implementation. It can be used to throttle expensive resources.
Other
38 stars 17 forks source link

#7 releasing all connections on destroyAllNow #9

Closed olmaygti closed 5 years ago

olmaygti commented 5 years ago

Fix for #7 tackling down the root problem: this._availableObjects variable was being emptied before the connections were actually released resulting in an inconsistency at runtime; by the time destroy(resource) was called, connections were still active but the reference in memory was already lost.

olmaygti commented 5 years ago

Thanks for the review @SimonSchick, will make those changes and add a test for fhis change

sushantdhiman commented 5 years ago

Thanks for this PR, should be fixed by https://github.com/sequelize/sequelize-pool/pull/10